Created
November 22, 2012 18:23
-
-
Save mrloop/4132465 to your computer and use it in GitHub Desktop.
temp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"basePath": "http://api-sentiment.3scale.net", | |
"apiVersion": "v1", | |
"apis": [ | |
{ | |
"path": "/v1/word/{word}.json", | |
"operations": [ | |
{ | |
"httpMethod": "GET", | |
"summary": "Returns the sentiment value of a given word", | |
"description": "<p>This operation returns the sentiment value on a scale from -5 to +5 of the given word.<p>For instance, the word \"awesome\" returns {\"word\":\"awesome\",\"sentiment\":4} with a positive connotation whereas \"damnit\" is less positive {\"word\":\"damnit\",\"sentiment\":-4}", | |
"parameters": [ | |
{ | |
"name": "word", | |
"description": "The word whose sentiment is returned", | |
"dataType": "string", | |
"required": true, | |
"paramType": "path" | |
}, | |
{ | |
"name": "app_id", | |
"description": "Your access application id", | |
"dataType": "string", | |
"paramType": "query", | |
"threescale_name": "app_ids" | |
}, | |
{ | |
"name": "app_key", | |
"description": "Your access application key", | |
"dataType": "string", | |
"paramType": "query", | |
"threescale_name": "app_keys" | |
} | |
] | |
}, | |
{ | |
"httpMethod": "POST", | |
"summary": "Sets the sentiment value of a given word", | |
"description": "<p>This operation allows you to set the sentiment value to a word.<p>The sentiment value needs to be on the range -5 to +5.", | |
"parameters": [ | |
{ | |
"name": "word", | |
"description": "The word whose sentiment is returned", | |
"dataType": "string", | |
"required": true, | |
"paramType": "path" | |
}, | |
{ | |
"name": "value", | |
"description": "The sentiment value of the word, must be -5 to -1 for negative or to +1 to +5 for positive connotations", | |
"allowableValues": { | |
"values": [ | |
"-5", | |
"-4", | |
"-3", | |
"-2", | |
"-1", | |
"1", | |
"2", | |
"3", | |
"4", | |
"5" | |
], | |
"valueType": "LIST" | |
}, | |
"dataType": "string", | |
"required": true, | |
"defaultValue": "1", | |
"paramType": "query" | |
}, | |
{ | |
"name": "app_id", | |
"description": "Your access application id", | |
"dataType": "string", | |
"paramType": "query", | |
"threescale_name": "app_ids" | |
}, | |
{ | |
"name": "app_key", | |
"description": "Your access application key", | |
"dataType": "string", | |
"paramType": "query", | |
"threescale_name": "app_keys" | |
} | |
] | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment