Skyscanner API: Cannot create session via Flights Live Pricing - api

I'm exactly following this API guide via curl but yet keep getting this messages:
{"ValidationErrors":[{"Message":"Rate limit has been exceeded: 0
PerMinute for PricingSession"}]}
I'm new there and i'm sure i have never pulled before. Therefore, there's no way i could have "exceeded" the rate.
Please let me know why and how to solve it.

It looks like their hotel and Flight's live pricing API are down at the moment, as per their documentation.
I am getting the same error as

Related

ASP.NET Core Web API - Measuring response data

We have an ASP.NET Core Web API project. Today on accident I found an API method that was returning unnecessary amounts of data.
In my example we were returning users along with countries which is what we needed, but we were also returning a list of cities for each country so that was a tremendous amount if data, I was able to reduce it from 7MB to 23KB (per Insomnia client).
I was able to fix this by performing a select and creating a new country object and not passing in the cities property. I am not even sure if that's the right way to fix that problem but I will leave that for another time. My question is...
Is there a tool/nuget package out there that would provide this type of info? I'd like to get an idea on how much data we are sending to the clients when different methods are called. We have app insights but I don't believe it provides that data or at least I don't see it.
Thank you!
I was able to resolve this issue by writing some middleware code that logs the results to azure application insights, here is a copy of the code if anyone needs it:
https://gist.github.com/tekguy/52b245f6582158d7240f80bf46c4cc71
You can then query this info by using app insights log query:
requests
| order by timestamp desc
| project url, customMeasurements.Size

eBay LMS Trading API AddFixedPriceItemRequest returns 'SKU already in use' error

I've been working on an automatized eBay-upload-item module for a while now and every time I think it could work, eBay comes up with a new non-sense error. Currently the error is:
SKU already in use
I have 0 items in my listing, (active, ended, unsold etc), literally, 0 items anywhere. And when i try to make a BULK upload via the Trading API using individual AddFixedPriceItemRequest per item (including variations), I get the above error, which makes no sense.
All my SKUs are uniquely generated and then checked for against a database that stores them so as to avoid duplication. There is no documentation anywhere, and just basing my debugging on eBay's error reporting can drive anyone into insanity.
Any help will be much appreciated. Thanks
First of all, make sure that the item you're trying to upload is not a Multi-SKU item. This error can appear for multiple problems related to any part of your listing.
It would be also great if you can post API request and response here.

Soundcloud API: Find track like date via API

I've tried searching through Stack overflow as well as the soundcloud API reference but couldn't find any answer. I'm trying to retrieve the date a user liked a song on Soundcloud. I tried two parts of the API:
- /users/{id}/favorites: This will return all tracks liked by the user, but no date when it was liked.
- /me/activities: This returns track reposts, comments and seemingly tracks that show up on the stream. Sadly there doesn't seem to be a type track-like, but maybe I'm doing something wrong here or need to pass additional parameters.
I'm having the user log into Soundcloud before utilizing the API.
Any chance someone knows if retrieving the track like date via the API is possible?
Thanks!
With the public API available right now, this is not possible.
You have to build it on your own and track the changes in a different, your own database.
Example call from the website when you lookup your likes, i dont know what you will see with a pro account:
https://api-v2.soundcloud.com/users/soundcloud:users:1672444/stats/timeseries/likes?from=1442016000000&to=1442534400000&resolution=day&tracks=soundcloud%3Atracks%3A30984358&client_id=02gUJC0hH2ct1EGOcYXQIzRFU91c72Ea&app_version=39e9f65
Response:
[{"user_urn":"soundcloud:users:1672444","timeseries":[{"time":1442016000000,"count":1},{"time":1442534400000,"count":1}]},{"user_urn":"soundcloud:users:1672444","track_urn":"soundcloud:tracks:30984358","timeseries":[{"time":1442016000000,"count":1},{"time":1442534400000,"count":1}]}]
Here is and older, related answer about playback stats:
How to fetch playback statistics

Why do I get the 'Oops' error from Instagram API location search (when using coordinates)?

I'm tring to search locations with the Instagram API in my application but also when testing with Apigee, I get 500 Internal server error, and Oops, an error occurred.
Apigee: https://apigee.com/console/instagram
Authenticate yourself and add this URL: https://api.instagram.com/v1/locations/search?lat=40.758896&lng=-73.985131
It should return Time Square locations. It worked a few times in the past, but currently it doesn't.
It would be an overkill to use the Foursquare api to search for locations, then pass the location id to Instagram. Is that the only way to get around this? Because once you know the location's ID it works ok.
My possible solution would be to let the user find the desired location here: http://worldc.am/id/47383924f964a520444c1fe3
And use the v2 foursquare API location ID for Instagram.
The Instagram API is pretty bad in that regards - it often just says "Oops an error occured!", without giving you any more info.
I believe their servers have a really low time out limit. Add the parameter distance=500, or even less, and you won't get this error any more. Basically, in a high density area (like a big city), you need to specify a small distance number, otherwise Instagram's server just times out while serving your request.

Get A Users Over All Retweet and Mention Counts using Twitter API

We are working on some analytics using the amount a user is retweeted or mentioned... I can't seem to find a way to get these numbers using the apis does anyone have any ideas?
https://api.twitter.com/1/statuses/user_timeline.json?include_entities=true&include_rts=true&screen_name={screen_name}&count={count}
it's important to include the line include_entities=true to the request. This will give you an expanded response including re-tweet and mention counts.
Get Status / User Timeline
Twitter API Console
Update:
to get tweets from the last 90 days, there is a Node.js library you can use called Snapbird
https://github.com/remy/snapbird
.. and here is another resource covering the same topic.
http://blog.tweetsmarter.com/twitter-search/10-ways-and-20-features-for-searching-old-tweets/