https://api.twitter.comversion1.1TEMPLATExs:string1.11.01.1formatjsonTEMPLATEjsonjsoncountQUERYxs:stringsince_idQUERYxs:stringmax_idQUERYtrim_userQUERYxs:booleancontributor_detailsQUERYxs:booleaninclude_entitiesQUERYxs:booleanapplication/json;charset=utf-8200Responseapplication/xml; charset=utf-8404errorshttps://api.twitter.comGlobal HTTP Settingsscreen_nameQUERYxs:stringcountQUERYxs:stringapplication/json;charset=utf-8200Responsehttps://api.twitter.comGlobal HTTP Settingsapplication/json;charset=utf-8200Responsehttps://api.twitter.comGlobal HTTP Settingscount50QUERYxs:string50since_idQUERYxs:stringmax_idQUERYxs:stringapplication/json; charset=utf-8200Responseapplication/json;charset=utf-8200Responseapplication/xml; charset=utf-8404errorshttps://api.twitter.comGlobal HTTP Settingsversion1.1TEMPLATExs:string1.11.11.0formatjsonTEMPLATEjsonjsonqQUERYxs:stringsince_idQUERYxs:stringmax_idQUERYxs:stringresult_typeQUERYxs:stringmixedrecentpopularcountQUERYxs:stringgeocodeQUERYlangQUERYlocaleQUERYuntilQUERYinclude_entitiesQUERYxs:booleancallbackQUERYapplication/json;charset=utf-8200twe:Responseapplication/json; charset=utf-8400twe:Faulthttps://api.twitter.comGlobal HTTP Settingsapplication/json; charset=utf-8200set:Responsehttps://api.twitter.comGlobal HTTP SettingsSEQUENTIALBasic twitter API requests
- Search Request : makes sure there are hits when searching for "soapui"
- Retweet Request : makes sure there are retweets of our account
- Mentions Request : makes sure there are mentions of our account
- User Timeline Request : makes sure that our timeline contains at least 3 entries
see https://dev.twitter.com/docs/api/1.1https://api.twitter.comdeclare namespace ns1='https://api.twitter.com/1.1/search/tweets.json';
//ns1:Response[1]/ns1:search_metadata[1]
*
*
*
*
*
soapui
*
0
0
]]>truefalsefalsedeclare namespace ns1='https://api.twitter.com/1.1/search/tweets.json';
count( //ns1:Response/ns1:statuses/ns1:e)> 5truefalsefalsefalseGlobal HTTP Settingshttps://api.twitter.comcount( //Response/e/text) > 0truefalsefalsefalseGlobal HTTP Settingshttps://api.twitter.comexists( //Response/e/text)truefalsefalsefalseGlobal HTTP Settingshttps://api.twitter.comcount( //Response/e/text) > 3truefalsefalsefalseGlobal HTTP Settingsoauth_consumer_keyoauth_consumer_secretoauth_access_tokenoauth_access_token_secret// get project
def project = com.eviware.soapui.model.support.ModelSupport.getModelItemProject( request )
// initialize OAuth consumer
def consumer = new oauth.signpost.commonshttp.CommonsHttpOAuthConsumer(
project.getPropertyValue( "oauth_consumer_key" ),
project.getPropertyValue( "oauth_consumer_secret" ));
consumer.setTokenWithSecret(
project.getPropertyValue( "oauth_access_token" ),
project.getPropertyValue( "oauth_access_token_secret" ));
// sign the request
consumer.sign( context.httpMethod )