Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
divshot
Advanced tools
Readme
Wrapper for the Divshot API.
npm install divshot --save
Refer to the Narrator api for a more in depth understanding of all available methods.
CommonJS (Node/Browserify)
var Divshot = require('divshot');
Standalone
<script src="/path/to/divshot.standalone.min.js"></div>
###Instantiate
var api = Divshot.createClient({
email: 'someone@divshot.com',
password: 'somepassword123!',
// OR
token: 'your divshot access token'
});
###Angular Module
Located at /dist/divshot.angular.js
angular.module('myApp', ['divshot'])
.config(function (divshotProvider) {
divshotProvider.configure({
token: 'divshot_api_access_token'
});
}).
controller('SomeCtrl', function ($scope, divshot) {
$scope.apps = divshot.apps.list();
});
###User
By default, the authenticate
method will be called on each request as a pre hook. If a token is provided, this does not create another http request.
api.user.authenticate(function (err, token) {
});
api.user.setCredentials({
email: 'someone@divshot.com',
password: 'somepassword123!',
// OR
token: 'some_really_long_access_token_from_divshot'
});
// User data
api.user.self().then(function (user) {
});
// OR
api.user.id(userId).get().then(function (user) {
});
// Update user
var user = api.user.id(userId);
user.update({
name: 'First Last'
}).then(function (user) {
});
// Change password
divshot.user.password.update({
password: 'Password123',
password_confirm: 'Password123'
}).then(function (res) {
});
// Add email
divshot.user.emails.add('something@aol.com').then(function (res) {
});
// Set primary email
divshot.user.emails.primary('something@aol.com').then(function (res) {
});
// Remove email
divshot.user.emails.remove('something@aol.com').then(function (res) {
});
// Resend email
divshot.user.emails.resend('something@aol.com').then(function (res) {
});
// Users orgs
divshot.organizations.list().then(function (orgs) {
});
// A single organization
divshot.organizations.id(someOrgId).get().then(function (org) {
});
// Apps from an organization
divshot.organizations.id(someOrgId).apps.list().then(function (apps) {
});
// Update organization
divshot.organizations.id(someOrgId).update({
name: 'name',
billing_email: 'someone@aol.com',
gravatar_email: 'someone@aol.com',
etc: 'other stuff'
}).then(function (res) {
});
// Get org members
divshot.organizations.id(someOrg).members.list().then(function (members) {
});
// Invite members to organization
divshot.organizations.id(someOrg).members.create({
name: email,
email: email
}).then(function (res) {
});
// Update a member in organiztion
divshot.organizations.id(someOrg).members.id(memberid).update({
admin: false // or true
}).then(function (res) {
});
// Remove a member from an organization
divshot.organizations.id(someOrg).members.id(memberId).remove().then(function () {
});
// List apps
api.apps.list().then(function (apps) {
});
// Create an app
api.apps.create('app-name').then(function (app) {
});
// A specific app
var app = api.apps.id('app name');
app.get().then(function (app) {
});
app.builds.list(function (err, builds) {
});
app.builds.id('build id').get(function (err, build) {
// Specific build by id
});
app.builds.id('build id').finalize(function (err, response) {
});
app.builds.id('build id').release('production', function (err, response) {
});
###Releases
app.releases.list(function (err, releases) {
});
app.releases.env('production').get(function (err, release) {
// Release by environment
});
app.releases.env('production').rollback(function (err, response) {
});
app.releases.env('production').promote('staging', function (err, callback) {
// Here, "staging" is the from environment
// and "production" is the to-environment
});
###Domains
// List domains for an app
app.domains.list().then(function(domains) {
});
// Add a domain
app.domains.add('www.domain.com').then(function (response) {
});
// Remove a domain
app.domains.remove('www.domain.com').then(function (response) {
});
###App Environment Configuration
app.env('development').config({
auth: 'username:password'
}, function (err, response) {
});
grunt build
FAQs
Wrapper for the Divshot api
The npm package divshot receives a total of 47 weekly downloads. As such, divshot popularity was classified as not popular.
We found that divshot 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.