
Research
/Security News
60 Malicious Ruby Gems Used in Targeted Credential Theft Campaign
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
redux-json-api
Advanced tools
A bunch of Redux actions, action creators and reducers to integrate with a JSON API
Redux actions, action creators and reducers to make life with JSON APIs a breeze.
npm install redux-json-api
state.api
)setEndpointHost
and setEndpointPath
setAccessToken
You're now good to go. So have a look the the available actions below.
{
"api": {
"users": {
"data": [
{
"type": "users",
"id": 1,
"attributes": { }
}
],
"isInvalidating": "IS_DELETING"
},
"isCreating": 0,
"isReading": 0,
"isUpdating": 0,
"isDeleting": 0,
"endpoint": {
"host": null,
"path": null,
"accessToken": null
}
}
}
Entity objects are 1-to-1 with the API response.
Each function accepts an options object with two callbacks: onSuccess
, onError
.
createEntity(entity, options)
Pass a full resource object to createEntity
. It will trigger a request to POST /${entity.type}
.
Expects the API to return 200 OK
with the newly created resource object in response body.
readEndpoint(endpoint, options)
Provide the endpoint from where to read. E.g. users/1/roles
. The module will read each entity and map them from their type specified.
updateEntity(entity, options)
Pass your resource object to updateEntity
. It will trigger a request to PATCH /${entity.type}/${entity.id}
.
Expects the API to return 200 OK
with the updated resource object in response body.
deleteEntity(entity.options)
Accept a resource object and triggers a request to DELETE /${entity.type}/${entity.id}
.
Expects the API to return 204 No content
.
FAQs
A bunch of Redux actions, action creators and reducers to integrate with a JSON API
The npm package redux-json-api receives a total of 1,125 weekly downloads. As such, redux-json-api popularity was classified as popular.
We found that redux-json-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.