sourceapi
Source Code API for https://sourcecode.glitch.me
Last updated 2 years ago by truexpixels .
MIT · Original npm · Tarball · package.json
$ cnpm install sourceapi 
SYNC missed versions from official npm registry.

Source Code API

NOTE: This is an alpha build while the API gets reworked, supports ID's & all

Website: https://sourcecode.glitch.me

Note:

  • <data>.packagesUsed are actually tags
  • <data>.views aren't counted
  • <data>.rating may return an array

Example:

let sc = require('sourceapi');

sc('1363896474854890').then(i => {
  
  console.log(i);
  /* ->
  
  { username: '[HypeSquad] ricegrains#0911',
  title: 'Weather command',
  difficulty: 'Easy/Medium',
  packagesUsed: 'weather-js, discord.js',
  code: 'const Discord = require(\'discord.js\');\nconst weather = require(\'weather-js\');\n\nmodule.exports.run = (client, message, args) => {\n  weather.find({search: args.join(" "), degreeType: \'C\'}, function(err, result) {\n      if (err) message.channel.send(err);\n      if (result === undefined || result.length === 0) {\n          message.channel.send(\'**Please enter a location!**\')\n          return;\n      }\n      var current = result[0].current;\n      var location = result[0].location;\n      const embed = new Discord.RichEmbed()\n          .setDescription(`**${current.skytext}**`)\n          .setAuthor(`Weather for ${current.observationpoint}`)\n          .setThumbnail(current.imageUrl)\n          .setColor(0x00AE86)\n          .addField(\'Timezone\',`UTC${location.timezone}`, true)\n          .addField(\'Degree Type\',location.degreetype, true)\n          .addField(\'Temperature\',`${current.temperature} Degrees`, true)\n          .addField(\'Feels Like\', `${current.feelslike} Degrees`, true)\n          .addField(\'Winds\',current.winddisplay, true)\n          .addField(\'Humidity\', `${current.humidity}%`, true)\n          message.channel.send({embed});\n  })\n}',
  desc: '',
  key: '1363896474854890',
  approved: true,
  views: 0,
  rating: 0 }
  
  */
  
});

Current Tags

  • 0.0.4                                ...           latest (2 years ago)

4 Versions

  • 0.0.4                                ...           2 years ago
  • 0.0.3                                ...           2 years ago
  • 0.0.2                                ...           2 years ago
  • 0.0.1                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 17
Dependencies (1)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |