![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
This package is an asynchronous implementation of the new Envato API and provides an easy interface for accessing all applicable methods. At the moment, this package only supports personal token authentication, not OAuth.
I wanted an easy wrapper for the Envato API which would simplfy the way you pass variables and handle errors automatically, returning a raw JSON response. This package does just that.
npm install --save envato-api
First you must require the package into your module. Note that the package exports a function which is used for setting your personal token and user agent.
Be sure to replace the two variables.
PERSONAL_TOKEN
is the secret token you retrieved from https://build.envato.com/my-apps.USER_AGENT
is a description of your script only visible to the Envato API team. You should include your contact email and a short description of what your script does.var EnvatoAPI = require('envato-api')('PERSONAL_TOKEN', 'USER_AGENT');
Each method is detailed at https://build.envato.com/api/. All parameter names are the same, and should be passed inside an object.
getCollection({ id: 1234 })
getItem({ id: 1234 })
searchItems({ site: 'codecanyon', term: 'query', ... })
searchComments({ item_id: 1234, term: 'query', ... })
getPopularItems({ site: 'codecanyon' })
getCategories({ site: 'codecanyon' })
getItemPrices({ item_id: 1234 })
getNewItems({ site: 'graphicriver', category: 'graphics' })
getFeaturedItems({ site: 'graphicriver' })
getRandomNewFiles({ site: 'graphicriver' })
getUserCollections()
getPrivateCollection({ id: 567890 })
getUsersDetails({ username: 'collis' })
getUsersBadges({ username: 'collis' })
getUsersItems({ username: 'collis' })
getUsersNewItems({ username: 'collis', site: 'graphicriver' })
getSales({ page: 1 })
getSaleByCode({ code: '123-456-789' })
getPurchases({ page: 1 })
getPurchaseByCode({ code: '123-456-789' })
getPrivateUserDetails()
getUsername()
getEmail()
getSalesByMonth({ ... })
getTotalMarketUsers()
getTotalMarketItems()
getTotalFilesBySite({ site: 'codecanyon' })
Each method will return a Promise
which will resolve with the parsed JSON object or reject with an error.
The output is not modified, so the output is the same as on build.envato.com.
EnvatoAPI.getUsername().then(
function (response) {
console.log('Current user is:', response.username);
},
function (error) {
console.log('Error:', error.message);
}
);
The error.message
property will contain the following under these circumstances:
Bad Request
when invalid parameters are sent or required parameters are missing.Unauthorized
when the personal token is invalid.Access Denied
when you've reached your rate limit or are banned.Not Found
when no matches or results were found by the endpoint.Internal Server Error
when the API is experiencing problems.Request Error: <message>
when there's an error executing the HTTP request.
Error code <000>: <message>
when another HTTP code is received than those above.FAQs
Easily interact with the Envato Market API using a personal token.
The npm package envato-api receives a total of 3 weekly downloads. As such, envato-api popularity was classified as not popular.
We found that envato-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.