schibsted / spid-tech-docs Goto Github PK
View Code? Open in Web Editor NEWTechnical documentation for the Schibsted account platform
Technical documentation for the Schibsted account platform
http://preview-docs.spid.no/endpoints/GET/user/%7BuserId%7D/
Unauthorized access to users will only return the public fields:
It isn't that the access is unauthorized, it is an authorized request for a user that is not connected to the client that is asking for the information.
Should we inform someone when a build fails? I say yes!
Figure out what (if anything) to do with this
http://techdocs.spid.no/endpoints/POST/paylink/
Example now is:
echo var_dump($client->api("/paylink", $params));
should be:
echo var_dump($client->api("/paylink", "POST", $params));
http://preview-docs.spid.no/endpoints/GET/user/%7BuserId%7D/
* id
* user_id
* status
* play_name
* name
* gender
* preferred_username
* utc_offset
* published
* updated
* ast_logged_in
* locale
* tracking
play_name > display_name
ast_logged_in > last_logged_in
And they should be camelBack, not underscored
Somehow make articles that are currently "orphans" visible
Update oauth/exchange
routes definition:
type
parameter, replace
The type of exchange. `code` is the only supported type.
with
The type of exchange, either `code` or `session`.
redirectUri
parameter, prefix with:
Used with type `session`.
Then run ./import-endpoints.sh
to update tech-docs. :-)
Otherwise the "send us a pull request" link fails with a 404.
In the parameter descriptions for POST /product it says:
"VAT, in cents"
This is wrong. It should be "VAT, fraction × 10000. For instance, 25% would be 2500"
Quote @alkemann:
http://preview-docs.spid.no/getting-started/ puts javascript next to the others. It has a "code example" for the "all endpoints". This is very misleading as we do not have a Javascript endpoint and in fact the APIs are not avaible to the frontend at all. the "javascript sdk" we do have uses custom http requests made just for it
Curl example that are GET requests must have a -G flag, otherwise it is sent as POST when -d/--data or --data-binary flags are used.
The other thing would be to just append query to url with a '?'.
Example: http://techdocs.spid.no/endpoints/GET/search/users/
Hej!
Curl-exemplen som är GET requests, t.ex:
http://techdocs.spid.no/endpoints/GET/search/users/
borde ha en flagga -G också annars så blir det en POST request.
(
-G/--get
When used, this option will make all data specified
with -d/--data or --data-binary to be used in a HTTP GET request
instead of the POST
request that otherwise would be used. The data will be
appended to the URL with a '?' separator.
)
If not directly downloadable in the techdoc site, it should be linked in from the origin (Merchant site, selfservice, etc).
Change to techdocs.spid.no
Update URLs in routes, add /
-prefix
Search for:
/types/voucher-type
/types/payment-options
/types/product-type
/types/product-status
/types/datetime
/types/order-status
/types/order-type
/types/address
/endpoints/GET/describe/{object}
Refer to this from the partial examples on endpoint pages
And answer the developer who commented.
Considering that you require the client file in the config file and it requires the exception file, all files are loaded and there is no reason for the "is on your PHP system's include_path." step.
Tracking ID
UA-51489276-1
Add a proper description of this endpoint along with a full Varnish implementation guide (see the old PDFs)
Several smaller issues here since I think we should strive for the users to be able to just copy-n-paste the shown solution.
$spidBaseURL
and $ourBaseURL
.// config.php.sample
config.php.sample is not a valid filename for php. I know this is just a comment, but when reading you get the expression that the file is named that way.What are these? Find out and describe:
discountId
in the campaign-product typeincludeChildren
in the campaign-product typemasterId
in the transaction typediscountId
in the voucher-group typeDid you spot an error? Or maybe you just have a suggestion for how we can improve? Leave a comment, or better yet, send us a pull request on GitHub to fix it (in-browser editing, only takes a moment).
History of this page
These are great on the article pages. Not so much on the endpoint pages, tho.
Since the endpoint pages is built from a myriad of sources, the history is misleading, and the pull request won't contain the information users want to change most of the time.
I suggest removing the Github pull request and History links from this text on endpoint pages.
We are missing the big article/documentation on how to use JS SDK, verifying signatures, parameters and so on.
Not sure how to access that one anymore..
Create empty files for non-existent types and point the user to where they are located.
It matches the bits in the "payment options" bitmask, but the type field in payment identifier may never be a combination of to bits, it is always a core bit.
Add these parameter descriptions for /user/{userId}/charge
requestReference
A unique reference that identifies the request. Used to validate that each charge request is unique for the combination of clientId + requestReference + request status and ensure that duplicate requests are not processed more than once. Sending the same `requestReference` will always result in the same response.
hash
A [verified request hash](/verified-hash/) signed with your client sign secret.
purchaseFlow
`"DIRECT"` or `"AUTHORIZE"`. Defaults to `"DIRECT"`. See [the paylink API](/paylink-api/#purchase-flows) for details.
items
A JSON string of order items. See introduction.
http://preview-docs.spid.no/endpoints/GET/search/users/%7Bquery%7D/
This isnt really deprecated, its a an alias for /search/users?query={query} that does a free text search.
How to use composer should be a guide with link to the composer website.
First, create a composer.json in a new directory containing this information:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/schibsted/sdk-php"
}
],
"require": {
"schibsted/sdk-php": "dev-master"
}
}
(The dev-master will download from the master branch, could be changed to a version number if tagged etc.)
Then run the composer install command in the same directory
composer install
or php composer.phar install
depending on how you installed composer.
If composer is used requiring the client.php is unnecessary:
require_once("../../sdk-php/src/Client.php");
One should instead just require the require vendor/autoload.php
. IMO, this should be the standard as composer is pretty much standard in the php community nowadays.
Refer to this from the partial examples on endpoint pages
Find user/{userId}/order/{orderId}
"filters"
to optional parameters."items"
and "identifier"
to filters-array.Find vouchers/handout/{voucherGroupId}
"amount"
description to The number of vouchers to retrieve. Defaults to 1.
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.