Code Monkey home page Code Monkey logo

restapi-guideline's People

Contributors

aureliuszbrussy avatar github-actions[bot] avatar hjagodzinski avatar krzysztof-konieczny avatar lukasz-zurek avatar lukaszrola avatar mtrojanowski avatar teskekarol avatar theterabit avatar tomjankes avatar walec51 avatar zenedith avatar zxspeccy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

restapi-guideline's Issues

Pagination details

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?

offset param

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

user-id in url

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.

Bulk price and stock update

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.

Refreshing token

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;
		}
	}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.