allegro / restapi-guideline Goto Github PK
View Code? Open in Web Editor NEWAllegro REST API Guideline.
Home Page: https://allegro.github.io/restapi-guideline
License: Other
Allegro REST API Guideline.
Home Page: https://allegro.github.io/restapi-guideline
License: Other
https://github.com/allegro/restapi-guideline#urls-for-users-collections notes that user collections must include user-id in URI.
What is the reason of this requirement?
URI should be designed upon responsibility of the service.
MyAccount service is responsible for retrieving authorized user data (identified by some Authorization info) and therefore userId in URI is redundant.
There may be some applications (for example OffersService) which may retrieve any users offers upon authorized or unauthorized request.
Is caching a concern here?
Neither /userinfo/{user-id} (with header) nor /userinfo (with header) can be cached becouse token (oauth) user:pass pair (basic auth) can be revoked and cache/proxy won't have any info abut that fact.
Dear devs,
I'm writing concerning param offset, in documentation was written: Use offset instead of page and limit parameters. It is much more flexible for the client, e.g..
For example i've tried to search by category: GET /offers?offset=0&limit=5&country.code=PL&category.id=2
And when i want to extract next part of collection
GET /offers?offset=5&limit=5&country.code=PL&category.id=2
i've got the same result and any changes in param offset working same way, everytime i've got the same result with same enteties.
My question is: what it colud be and why i am not able to extract next part of collection (I've already has registred REST API and have all necessary key
How to return the pagination details for resources? Client needs to know how much resources are available for calculating page numbers. Do you have any suggestions?
Hi
I've tried to make a refreshing token function but something is not going thru,
public function tokenRefresh($code)
{
$curl = curl_init($this->providerSettings['TokenUri']);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_HTTPHEADER, $this->headers);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query([
'api-key' => $this->providerSettings['ApiKey'],
'grant_type' => 'refresh_token',
'refresh_token' => $code,
'redirect_uri' => $this->providerSettings['RedirectUri']
]));
$result = ($result = curl_exec($curl)) === false ? false : json_decode($result);
if ($result === false) {
throw new Exception('Unrecognized error');
} else if (!empty($result->error)) {
throw new Exception($result->error . ' - ' . $result->error_description);
} else {
return $result;
}
}
Hello,
I want to update price and stock in bulk but my concern is:
As per this call: https://developer.allegro.pl/en/documentation/#operation/priceModificationCommandUsingPUT
I can edit the offer price in bulk but it has one single block of price in request and multiple offerids, so one same price will be updated to all offerids provided, is it true?
My concern is, I want to update different prices to different offers, how can this be possible in bulk?
Same issue with updating the stock quantity.
Please help.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.