Steam game price history using Steam API - steam-web-api

I would like to get price history of a specific Steam game.
I know that I can get current price information of a game like this (example with Portal 2):
GET https://store.steampowered.com/api/appdetails?filters=price_overview&appids=620
{
"620": {
"success": true,
"data": {
"price_overview": {
"currency": "USD",
"initial": 999,
"final": 999,
"discount_percent": 0,
"initial_formatted": "",
"final_formatted": "$9.99"
}
}
}
}
And there is https://steamcommunity.com/market/pricehistory to get price history of a specific item of a game.
Is there a way to get price history of a game itself?

There is no price history API directly from Steam.
You need to use third-party providers or record the prices yourself. Isthereanydeal might be helpful.

Related

Create Customer In PayPal

I was working on PayPal and wanted to know some things about PayPal that we can do in Stripe through Golang API:
can we create a customer through PayPal Go API and then attach card to it? Now What I have integrated is saved a card directly into PayPal vault and start transactions from the saved card. I have gone through the documentation of Go API and found no docs there about customer creation through API. PayPal API Docs
When we fill card details, is it possible we return a card nonce/token from the PayPal api so that the token represents all the card info?
Can I set a card to default card of the customer through PayPal Go API?
I need to know all of the above points through Go API. Can anyone guide me upon how can I do all of the above if is possible ??
From what I can gather you:
Create the order with intent to CAPTURE
POST /v2/checkout/orders
{
"intent": "CAPTURE",
"purchase_units": [
{
"amount": {
"currency_code": "USD",
"value": "1.00"
}
}
]
}
Then CAPTURE the order
POST /v2/checkout/orders/<OrderId>/capture
{
"payment_source": {
"token": {
"id": "VAULT CARD ID HERE",
"type": "PAYMENT_METHOD_TOKEN"
}
}
}
This is as far as I have gotten because I am getting a 500 error currently

Google Price Calculator API (GCP)

I am looking to build simple billing app for cloud resources using google price calculator https://cloud.google.com/products/calculator/
Does google provide any API's for interacting with google price calculator?
I tried but couldn't find any!
You can use the Cloud Billing Catalog API, according to the official documentation:
Get a list of all public SKUs within a service including:
Human readable description of the SKU.
Public pricing of the SKU.
Regions where the SKU is available for purchase.
Categorization data about the SKU.
An example:
Request:
GET https://cloudbilling.googleapis.com/v1/services/SERVICE_ID/skus?key=API_KEY
Where SERVICE_ID is the identifier of the parent service.
Response:
{
"skus": [
{
"name": "[SKU_NAME]",
"skuId": "[SKU_ID]",
"description": "[SKU_DESCRIPTION]",
"category": {
"serviceDisplayName": "[SVC_DISPLAY_NAME]",
"resourceFamily": "[FAMILY]",
"resourceGroup": "[GROUP]",
"usageType": "[USAGE]",
},
"serviceRegions": [
"[REGION]"
],
"pricingInfo": [
{
"effectiveTime": "[TIME]",
"summary": "[SUMMARY]",
"pricingExpression": {
"usageUnit": "[UNIT]",
"usageUnitDescription": "[UNIT_DESCRIPTION]",
"displayQuantity": [DISPLAY_QUANTITY],
"tieredRates": [
{
"startUsageAmount": [START_AMOUNT],
"unitPrice": {
"currencyCode": "[CURRENCY_CODE]",
"units": [UNITS],
"nanos": [NANOS],
},
}
],
},
"aggregationInfo": {
"aggregationLevel": enum("[AGGREGATION_LEVEL]"),
"aggregationInterval": enum("[AGGREGATION_INTERVAL]"),
"aggregationCount": [AGGREGATION_COUNT],
},
"currencyConversionRate": [CONVERSION_RATE],
}
],
"serviceProviderName": "[SERVICE_PROVIDER]",
}
]
}
According to your question, you would want to use these response objects:
[UNIT] is the short hand for the unit of usage in which the pricing is specified. For example, usageUnit of GiBy means that usage is specified in "Gibibytes".
[DISPLAY_QUANTITY] is the recommended quantity of units for displaying pricing info. When displaying pricing info, it is recommended to display: (unitPrice * displayQuantity) per displayQuantity usageUnit. This field does not affect the pricing formula and is for display purposes only. For example, if the unitPrice is "0.0001 USD", the usageUnit is "GB" and the displayQuantity is "1000", then the recommended way to display the pricing info is "0.10 USD per 1000 GB".

Steam API all games

I've been reading forums and trying Steam APIs, I'm searching for an API which provides all Steam Games.
I found the API providing all SteamApps, and the Steam Store API which provides information for Apps (I'm looking for the type: 'game'), but for this, I need to call the store API once for each SteamApp... And the Store API is limited to 200 calls every 5 minutes! Is it the only solution?
EDIT:
All Apps API : http://api.steampowered.com/ISteamApps/GetAppList/v0002/?key=STEAMKEY&format=json
App details API : http://store.steampowered.com/api/appdetails?appids={APP_ID}
There is no "Steam API all games and all their details in one go".
You use GetAppList to get all the steam apps. Then you have to query each app with appdetails which will take a long time.
GetAppList : http://api.steampowered.com/ISteamApps/GetAppList/v0002/?format=json
{
"applist": {
"apps": [
{"appid": 10, "name": "Counter-Strike"},
{"appid": 20, "name": "Team Fortress Classic"},
{"appid": 30, "name": "Day of Defeat"},
{"appid": 40, "name": "Deathmatch Classic"}
]
}
}
appdetails : http://store.steampowered.com/api/appdetails?appids=10
{
"10": {
"success": true,
"data": {
"type": "game",
"name": "Counter-Strike",
"steam_appid": 10,
"required_age": 0,
"is_free": false,
"detailed_description": "...",
"about_the_game": "...",
"short_description": "...",
"developers": ["Valve"],
"publishers": ["Valve"],
"EVEN_MORE_DATA": {}
}
}
}
There is a general API rate limit for each unique IP adress of 200 requests in five minutes which is one request every 1.5 seconds.
Another solution would be to use a third-party service such as SteamApis which offers more options but they are inevitably bound to what Steam offers in their API.
A common method here is to cache the results.
So for example, if your using something like PHP to query the results, you would do something like json_encode and json_decode with an array / object to hold the last results.
You can get fancy depending on what you want, but basically you'll need to cache and then perform an update of the oldest.

Paypal REST API - Description/Item name missing

I am using paypal ruby sdk in order to process credit cards via rest api. Everything is working fine from perspective of credit card processing. Credit cards are processed properly without any kind of issues.
Unfortunately, when i preform the csv export of transactions on the sandbox (or live) merchant paypal account, the "Item Title" field is not populated and also I cannot see that description field is used anywhere.
Request to the paypal:
Request[post]: https://api.sandbox.paypal.com/v1/payments/payment
Request.body={
"intent":"sale",
"payer":{
"payment_method":"credit_card",
"funding_instruments":[{
"credit_card":{
"number":"xxxxxxxxxxxxxxxx",
"type":"visa",
"expire_month":10,
"expire_year":2020,
"first_name":"First Name",
"last_name":"Last Name"
}
}]
},
"transactions":[{
"amount":{
"currency":"USD",
"total":"1"
},
"description":"This is item description",
"item_list":{
"items":[{
"quantity":"1",
"name":"This is item description",
"price":"1",
"currency":"USD",
"sku":"This is item description"
}]
}
}]
}
Within the successful paypal response I am getting all of these data back including the fields populated with "This is item description".
My question is, which parameter we need to provide for this api call in order to populate "Item Title" field within transactions csv export?
What is the purpose of "description" field within this api request and where this field is used on paypal side (showed) after we process payment with credit card?
EDITED
Tried with PHP SDK as well (just to be sure that this is not an issue with specific SDK). At the end it seems that question is "Is there a field to be used as part of REST API which corresponds to 'Item Title' column within paypal export?"
Indeed answer from pp_pduan answers on initial bounty question (related with specific report). I am adding an update related with this specific report and other reports as well.
For credit card processing you can use following API's on paypal side:
Rest API
DoDirect Payment Api (Pro 3.0)
Payflow Gateway Api (Pro 1.5-2.0)
As per my discussion with paypal side and quite a detailed research, it is not possible to populate Item Name for some of the reports using REST API.
For credit card processing (in order to avoid issues in general with reporting systems) I suggest to go with DoDirect Payment Api if you have Pro accounts. Seems that this specific API is "older" then REST API credit card processing hence it is more stable and do not have any kind of issues with reporting system.
Having in mind that DoDirect Payment Api have weird documentation (at least for me this is not covered properly) I suggest to check following php repository with working solution (examples).
Try put a sample request payload like this,
{
"intent": "sale",
"payer": {
"payment_method": "paypal"
},
"redirect_urls": {
"return_url": "http://localhost:80/getpaypal",
"cancel_url": "http://localhost:80/cancel"
},
"transactions": [
{
"description": "Transaction Desc Text",
"amount": {
"total":"80",
"currency":"USD"
},
"item_list": {
"items": [
{
"name": "Test Ticket 1",
"currency": "USD",
"quantity": "1",
"sku": "55a460ff65f13",
"price": "10"
},
{
"name": "Test Ticket 2",
"currency": "USD",
"quantity": "2",
"sku": "55a460ff66c7a",
"price": "20"
},
{
"name": "Test Ticket 3",
"currency": "USD",
"quantity": "3",
"sku": "55a460ff66ce2",
"price": "10"
}
]
},
"invoice_number": "55a460ff696br"
}
]
}
And when you download transaction history (csv) from your PayPal profile,
If you've ticked the option "Include Shopping Cart details",
the "name" field under each item object will display in the "Item Title" col; and the description field in transaction object will be in that col as well
If you leave the option of "Include Shopping Cart details", the transaction will be a single record in the csv without the cart item rows, and you'll only see ""description": "Transaction Desc Text"," (description field in transaction object) in the Item Title col

What services can I use to fetch an image of a person based on their email address, without authentication

I know gravatar allows this, and I'd like to look into facebook, google plus, twitter, instagram, and anything else.
Do you guys know of any services like this?
EDIT: to clarify, by "without authentication" do I mean user authentication, I expect to use some sort of API
One possible approach, using Facebook Graph Api would be to perform a search against the name for users objects and also retrieve their pictures, using API version 2.2 it would be a call like:
GET graph.facebook.com
/search?q=miles davis&type=user&fields=id,name,picture
This would retrieve id, name and picture object for a search on miles davis, first results as example:
{
"data": [
{
"id": "805353876185303",
"name": "Miles Davis",
"picture": {
"data": {
"is_silhouette": true,
"url": "https://fbcdn-profile-a.akamaihd.net/hprofile-ak-xfp1/v/t1.0-1/c15.0.50.50/p50x50/10354686_10150004552801856_220367501106153455_n.jpg?oh=XXXXXXXXXXXXXXXX&oe=XXXXXX&__gda__=XXXXXXX_XXXXXXXXXXXXX"
}
}
},
{
"id": "1572370603017419",
"name": "Miles Davis",
"picture": {
"data": {
"is_silhouette": false,
"url": "https://fbcdn-profile-a.akamaihd.net/hprofile-ak-xap1/v/t1.0-1/p50x50/1501761_1382020035385811_1384168153_n.jpg?oh=XXXXXXXXX&oe=XXXXXXXXXXX&__gda__=XXXXXX_XXXXXX"
}
}
}, ...........
The field is_silhouette is false if the user has a profile picure.

Resources