adobe / adobe-fetch Goto Github PK
View Code? Open in Web Editor NEWMake calling Adobe APIs a breeze!
License: Apache License 2.0
Make calling Adobe APIs a breeze!
License: Apache License 2.0
When using readFileSync to read a private key, we get the following error:
Error while getting a new access token. TypeError [ERR_INVALID_ARG_TYPE]: The "key" argument must be one of type string, Buffer, TypedArray, DataView, or KeyObject. Received type object
at prepareAsymmetricKey (internal/crypto/keys.js:267:13)
at preparePrivateKey (internal/crypto/keys.js:285:10)
at Sign.sign (internal/crypto/sig.js:80:46)
This is because we use 'merge' to copy the options which turns the buffer into an object.
See docs here for information:
https://adobe-apiplatform.github.io/umapi-documentation/en/api/ActionsRef.html#actionThrottle
and this is a Python example:
https://adobe-apiplatform.github.io/umapi-documentation/en/samples/index.html#retrying-requests
Requirements:
Does this library work in the browser? I notice the use of node-persist
which implies probably not. Can you clarify? Thanks :)
Add Travis CI and CodeCov to this repo
Currently we automatically adds x-api-key, x-request-id and x-gw-ims-org-id headers.
We would like to be able to configure all predefined headers. Preconfigured headers will be automatically added to every request made by adobe-fetch.
If the request already contains the header, it will take priority over the preconfigured header.
Note HTTP headers are case insensitive.
🚨 You need to enable Continuous Integration on Greenkeeper branches of this repository. 🚨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.
Since we didn’t receive a CI status on the greenkeeper/initial
branch, it’s possible that you don’t have CI set up yet.
We recommend using:
If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/
.
Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.
Currently the package uses node-persist to persist the token cache.
Allow developers to integrate with their own storage by providing get & set hooks.
Calls to https://platform.adobe.io/data/privacy/gdpr should return a set of jobs
jobs:
[{jobId: 'xxxx-xxxx-xxxx-xxxx-xxxx', statusCode: 4},
{jobId: 'yyyy-yyyy-yyyy-yyyy-yyyy', statusCode: 4}]
Calls to https://platform.adobe.io/data/privacy/gdpr fail with:
{
"errors": {
"errorCode": 401,
"title": "Invalid Token",
"detail": "Expecting bearer token with this request",
"errorType": "uri=/data/privacy/gdpr"
},
"totalRecords": 0
}
$ node --version
v10.15.0
Running this code:
(async () => {
const adobeFetch = require('@adobe/fetch').config({auth:{
clientId: 'foo',
clientSecret: 'foo',
technicalAccountId: 'foo',
orgId: 'foo',
privateKey: 'foo',
metaScopes: ['ent_gdpr_sdk']
}});
const response = await adobeFetch('https://platform.adobe.io/data/privacy/gdpr');
console.log(await response.json());
})()
Results in:
{ errors:
{ errorCode: 401,
title: 'Invalid Token',
detail: 'Expecting bearer token with this request',
errorType: 'uri=/data/privacy/gdpr' },
totalRecords: 0 }
Allow overriding of the x-api-key header to use the same token across multiple services.
Add support and tests for using Headers object. Currently we are only supporting a headers json.
☝️ Important announcement: Greenkeeper will be saying goodbye 👋 and passing the torch to Snyk on June 3rd, 2020! Find out how to migrate to Snyk and more at greenkeeper.io
2.0.3
to 2.0.4
.This version is covered by your current version range and after updating it in your project the build failed.
prettier is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Automatically generate x-request-id header.
Requirements:
Support use in a browser environment.
Requirements:
Encrypt persisted token for added security.
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.