Invoking GET statuses/user_timeline with user_id='' seems to invoke GET statuses/home_timeline. Why? - api

As I was trying to harvest the user_timelines for a list of user_ids, I noticed that my own home_timeline was also being harvested. In the end I discovered that whenever my list used a null string entry for user_id, executing the code below was the same as executing
twitter_api.statuses.home_timeline. That is ok, but I do not see such behavior Twitter- documented? What am I missing in the documentation?
auth = twitter.oauth.OAuth(OAUTH_TOKEN, OAUTH_TOKEN_SECRET,CONSUMER_KEY, CONSUMER_SECRET)
twitter_api = twitter.Twitter(auth=auth)
twitter_api.statuses.user_timeline(user_id='')

You're correct - if you invoke the Twitter API v1.1 user_timeline method without a user_id or screen_name parameter specified (or null), it will return the user_timeline for the authenticated user making the API call. This is undocumented behaviour.
Note that home_timeline is a different method, and will return Tweets from the users you follow, not your own Tweets. I think you're describing the former (user_timeline), not home_timeline.
I'll make a note to get this added to the official API documentation.

Related

Kraken API AddOrder passes successfully but order is not placed on Kraken

I'm trying Kraken APIs via C# and I managed to call public APIs as well as private APIs for getting the balance and getting open orders. But when I wanted to try an AddOrder API I encountered a problem, the API is executed successfully, but there is no order on Kraken.
Below is the result I get after calling AddOrder API. It seems normal, no errors and all parameters are as I specified them (sell 0.01 btc at 8100.00 usd)
{"error":[],"result":{"descr":{"order":"sell 0.01000000 XBTUSD # limit 8100.0"}}}
But there is no order on Kraken platform. Any idea what I did wrong?
As #Milos found, validate = False will place the order.
From the documentation https://www.kraken.com/features/api#add-standard-order
validate = validate inputs only. do not submit order (optional)
I figured out that parameter validate has to be false!!
By default I set validate to true (which should be desired I guess),
but it does not work.
With validate == false order is placed correctly.
FYI, even if validate == false, basic input arguments check is performed.
When adding an order setting validate=true is a good means of testing. If you want to execute the order, set validate=false.

Get workspace details in podio api

Is there any way to get work space name and URL if the API request is authenticated as app.
Podio::authenticate_with_app($app_id, $app_token);
PodioSpace::get($space_id);
the above code return PodioForbiddenError
Sorry, but the I don't think this is allowed within the scope hierarchy.
Please refer to https://developers.podio.com/authentication/scopes
But, if you only need space name, id, url and couple of other minor details you could still get it by using fields parameter. This is described here: https://developers.podio.com/index/api (scroll down to the end of page).
Here is how I debug it with Ruby:
Podio.client.authenticate_with_app(<app_id>, <app_token>)
app = Podio::Application.find(app_id, {'fields' => 'space.view(full)'})
puts app['space']['name']
puts app['space']['space_id']
puts app['space']['url']

I am trying to use Yodlee/executeUserSearchRequest as a RESTful request and need an answer on how to call

I am working with the Yodlee services in c# and using the RESTful api. So far I have successfully connected and logged in with my CobrandSession and UserSessionToken in the development environment. I used the sample apps provided in c# and with some advice from shreyans i got an app working. What I got working was
1) Get YodleeAuthentication
2) Get UserAuthentication
3) Get ItemSummaries
I am now trying to get the full transaction details for each of the Items (i.e. collections of accounts that are an Item)
reading the Docs here https://developer.yodlee.com/Indy_FinApp/Aggregation_Services_Guide/REST_API_Reference/executeUserSearchRequest it states that I need to call executeUserSearchRequest and then paginate through the results using the getUserTransactions. So I am stuck at this point. I dont really want a search which has parameters I just want ALL transactions for this account that I can see.
However, I am using the variables as defined in that page :-
var request = new RestRequest("/jsonsdk/TransactionSearchService/executeUserSearchRequest", Method.POST);
request.AddParameter("cobSessionToken", param.CobSessionToken);
request.AddParameter("userSessionToken", param.UserSessionToken);
request.AddParameter("transactionSearchRequest.containerType", param.ContainerType);
request.AddParameter("transactionSearchRequest.higherFetchLimit", param.HigherFetchLimit);
request.AddParameter("transactionSearchRequest.lowerFetchLimit", param.LowerFetchLimit);
request.AddParameter("transactionSearchRequest.resultRange.endNumber", param.EndNumber);
request.AddParameter("transactionSearchRequest.resultRange.startNumber", param.StartNumber);
request.AddParameter("transactionSearchRequest.searchFilter.currencyCode", param.CurrencyCode);
request.AddParameter("transactionSearchRequest.searchFilter.postDateRange.fromDate", param.FromDate);
request.AddParameter("transactionSearchRequest.searchFilter.postDateRange.toDate", param.ToDate);
request.AddParameter("transactionSearchRequest.searchFilter.transactionSplitType.splitType", param.SplitType);
request.AddParameter("transactionSearchRequest.ignoreUserInput", param.IgnoreUserInput);
request.AddParameter("transactionSearchRequest.searchFilter.itemAcctId", param.ItemAcctId);
var response = RestClientUtil.GetBase().Execute(request);
var content = response.Content;
return new YodleeServiceResultDto(content);
As per the response from shreyans in this posting Getting Error "Any one of [**] of transactionSearchFilter cannot be NULL OR Invalid Values I am not putting in the ClientId and the ClientName
The documentation doesn't specify the format of the dates but the example seems to tell me that its american date format. And specifies a parameter saying IgnoreUserinput, but doesnt have a parameter for user input so this is confusing
When I make a call using this format I get an error response
var getSearchResult = yodleeExecuteUserSearchRequest.Go(yodleeExecuteUserSearchRequestDto);
getSearchResult.Result="
{"errorOccured":"true","exceptionType":"Exception Occured","refrenceCode":"_60ecb1d7-a4c4-4914-b3cd-49182518ca5d"}"
But I get no error message in this and I have no idea what I have done wrong or where to look up this error, can somebody who has used Yodlee REST Api point me in the right direction as I need to get this researched quickly....
thanks your your help, advice, corrections and pointers....
Here is the list of parameters which you can try
1) For a specific ItemAccountId all transactions
transactionSearchRequest.containerType=all
transactionSearchRequest.higherFetchLimit=500
transactionSearchRequest.lowerFetchLimit=1
transactionSearchRequest.resultRange.startNumber=1
transactionSearchRequest.resultRange.endNumber=500
transactionSearchRequest.searchClients.clientId=1
transactionSearchRequest.searchClients.clientName=DataSearchService
transactionSearchRequest.searchFilter.currencyCode=USD
transactionSearchRequest.searchClients=DEFAULT_SERVICE_CLIENT
transactionSearchRequest.ignoreUserInput=true
transactionSearchRequest.ignoreManualTransactions=false
transactionSearchRequest.searchFilter.transactionSplitType=ALL_TRANSACTION
transactionSearchRequest.searchFilter.itemAccountId.identifier=10000353
2) For a Specific account (itemAccountId) with start and end dates
transactionSearchRequest.containerType=all
transactionSearchRequest.higherFetchLimit=500
transactionSearchRequest.lowerFetchLimit=1
transactionSearchRequest.resultRange.startNumber=1
transactionSearchRequest.resultRange.endNumber=500
transactionSearchRequest.searchClients.clientId=1
transactionSearchRequest.searchClients.clientName=DataSearchService
transactionSearchRequest.searchFilter.currencyCode=USD
transactionSearchRequest.searchClients=DEFAULT_SERVICE_CLIENT
transactionSearchRequest.ignoreUserInput=true
transactionSearchRequest.ignoreManualTransactions=false
transactionSearchRequest.searchFilter.transactionSplitType=ALL_TRANSACTION
transactionSearchRequest.searchFilter.itemAccountId.identifier=10000353
transactionSearchRequest.searchFilter.postDateRange.fromDate=08-01-2013
transactionSearchRequest.searchFilter.postDateRange.toDate=10-31-2013

Astrid request returning empty

I'm trying to use the http://Astrid.com API, specifically to get data using the method under the "Request Format" section on this page - http://astrid.com/apidoc/file.README.html
The URL I built is:
https://astrid.com/api/7/task_list?app_id=[MY APP ID]&time=1&user_id=[MY USER ID]&sig=[MY REQUEST SIGNATURE]
And it returns this:
{"list":[],"time":1363131562,"status":"success"}
Seems like it worked, but does anyone know why the "list" array might be returning empty? I've created a bunch of tasks in my profile so it should be showing those.
Thanks!
You need to sign in first with the method user_signin. If successful you get a token.
Then you need to call the task_list method providing the token.
You do not need to provide a user id with the task_list method. It is only used to select tasks that you share with this user.
Example for signing in:
https://astrid.com/api/7/user_signin?provider=password&app_id=YOUR_APP_ID&secret=YOUR_ASTRID_PASSWORD&sig=SIGNATURE&time=1365715302.36&email=YOUR_EMAIL
Example for getting your tasks:
https://astrid.com/api/7/task_list?active=true&token=THE_TOKEN&sig=SIGNATURE&app_id=YOUR_APP_ID&time=1365715304.41

Flurry Event API not returning event parameter values

I have been trying to use the EventMerics API to return detailed event parameter data.
I have setup a test application and have uploaded event data with parameters, I can see the data in the web interface.
However the API doesn't seem to return the parameter data as stated by the documentation.
The following call
http://api.flurry.com/eventMetrics/Event?apiAccessCode=xxx&apiKey=xxx&startDate=2012-08-27&endDate=2012-08-27&eventName=heatmap%20-%20iPhone-Title-all
returns:
<eventMetrics type="Event" startDate="2012-08-27" eventName="heatmap - iPhone-Title-all" endDate="2012-08-27" version="1.0" generatedDate="8/27/12 10:45 PM">
<day uniqueUsers="2" totalSessions="12" totalCount="14" date="2012-08-27"/>
<parameters/>
</eventMetrics>
....
The parameters section is empty, I am expecting the following parameter values:
{touchXY : 299,465,2012-08-27 16:40:15 +0100}
{touchXY : 301,461,2012-08-27 16:29:03 +0100}
{touchXY : 192,312,2012-08-27 16:22:54 +0100}
{touchXY : 254,461,2012-08-27 16:23:04 +0100}
Has anyone got parameter values to return via the Flurry REST API?
the API call used by you is correct. I would recommend you to write to support#flurry.com to investigate why this is not happening.
(Disclaimer: I work in the Support team at Flurry)
The event name in the request is case sensitive so you should check the way it's written on the site. I changed mine from "editor" to "Editor" and the problem resolved.