How to use the imgur.setAPIUrl function in imgur

To help you get started, we’ve selected a few imgur examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github 1MB / 1mb-cli / src / commands / deploy.js View on Github external
const glob = require('glob-gitignore')

const {Command, flags} = require('@oclif/command')
const Configstore = require('configstore')
const fs = require('fs')
const request = require('request')

const conf = new Configstore('1mb-cli')
const parse = require('parse-gitignore')
const {cli} = require('cli-ux')
const path = require('path')
const imgur = require('imgur')

// imgur.setClientId('aCs53GSs4tga0ikp');
imgur.setAPIUrl('https://api.imgur.com/3/')

class DeployCommand extends Command {
    async run() {
        const {flags} = this.parse(DeployCommand)
        const self = this

        if (flags.clearcreds === true) {
            conf.clear()
        }

        let username = conf.get('username')
        if (typeof username === 'undefined') {
            username = await cli.prompt('What is your 1mbsite username?')
        }

        let key = conf.get('key')

imgur

Unofficial JavaScript library for Imgur

AGPL-3.0
Latest version published 10 months ago

Package Health Score

64 / 100
Full package analysis