how to request to twitter using a keyword with a space? - api

I want to make a request to Twitter for a keyword that has a space in it. So i want to do http://search.twitter.com/search.atom?q=land rover.
How do i do this?

Use URL encode:
http://search.twitter.com/search.atom?q=land%20rover

Like this: http://search.twitter.com/search.atom?q=land%20rover

Try http://search.twitter.com/search.atom?q=land%20rover.

Related

How to pass dynamic values to a GET API request?

The following GET request passes
#GET("api/v1/shades/colors?color=bl")
Call<List<Colors>> getColors();
but the following GET request fails.
#GET("api/v1/shades/colors?color={colorId}")
Call<List<Colors>> getColors(#Path(StringConstants.COLOR_ID) String colorId);
What's the right way to pass a dynamic value to a GET request?
Thank you!
It seems like you are using JaxRS web application. You should use this :
#GET("api/v1/shades/colors")
Call<List<Colors>> getColors(#Query("color") String colorId);
Check this: https://docs.oracle.com/javaee/6/tutorial/doc/gilik.html and this: https://mkyong.com/webservices/jax-rs/jax-rs-queryparam-example/.
Hope it helps !
Use annotation #RequestParam:
#GET("api/v1/shades/colors")
Call<List<Colors>> getColors(#RequestParam String colorId);

Parameters CrossBand Like XRCrossBandBox

I have a parameter Like the pictures Below :
How to Pull The XRLabel(Parameters) From GroupHeader1 to GroupFooter1 Like XRCrossbandBox did ?
unfortunately there is no such built in functionality

How do I send "#here" with the Slack API?

I know I can tag a user with <#U423DFDE|username> but I can't figure out how to tag #here
<!here> is the solution. There are other commands that work with the <!___> format.
Check out this part of the official Slack documentation for an overview about all such variables.
I use this:
var message= {
"text": "<!here> test text"
} ;
For channel use <#idchannel>, for username use <#memberIdName>
You can find it here:

Trello API get card comments

is there a way to get all the comments of a card through the Trello API? I can get the card, the list which it is in, the members assigned to it etc. but can't see a way to get the comments.
Thanks.
Comments are a type of action ("commentCard"), so look into the /card/:id/actions
Try this API URL
Method: GET
https://api.trello.com/1/cards/{card_Id}/actions?filter=commentCard&key={trellokey}&token={trellotoken}
GET /1/cards/[card id or shortlink]/actions
you'll get list of action-objects in json, each has its type, type for comment "commentCard",
comment text in
object.data.text
https://trello.com/docs/api/card/index.html#get-1-cards-card-id-or-shortlink-actions
Trello.actions.get(action.id + "/data", function() {})
seems to do it for me with client.js. Hope that helps :)

How do I get only the query string in a Rails route?

I am using a route like this
match "/v1/:method" => "v1#index"
My intention here is capture the name of the api method and then send the request to that method inside the controller.
def index
self.send params[:method], params
end
I figured this would send the other parameters as an argument to the method, but it didn't work. So my question is how can I pass the non-method parameters in a query string?
#query_parameters does exactly what you want:
request.query_parameters
It's also the most efficient solution since it doesn't construct a new hash, like the other ones do.
Stolen from the work of a colleague. I find this a slightly more robust solution, since it will work even if there are changes to the path parameters:
params.except(*request.path_parameters.keys)
I sort of solved this problem by doing this:
params.except("method","action","controller")