instagram-private-api
Advanced tools
Comparing version 0.0.3 to 0.0.4
{ | ||
"name": "instagram-private-api", | ||
"description": "Instagram private API wrapper with proxy features", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "bugs": { |
@@ -1,14 +0,29 @@ | ||
INSTAGRAM PRIVARE NODE.JS API | ||
INSTAGRAM PRIVATE NODE.JS API | ||
=================== | ||
![logo](https://cloud.githubusercontent.com/assets/1809268/15931032/2792427e-2e56-11e6-831e-ffab238cc4a2.png) | ||
![travis](https://travis-ci.org/huttarichard/instagram-private-api.svg) | ||
**Installation** | ||
You can install this by using npm: | ||
``` | ||
npm install instagram-private-api | ||
``` | ||
**What is this?** | ||
Since I had lot of troubles with official API (sandbox etc) I decided to make node.js api and provide code to others. It is OOP api, and have a coverage ... **I DO NOT USE THIS FOR SPAM**, hope you will not too. | ||
Since I had lot of troubles with official API (sandbox etc.) I decided to make Node.JS api and provide code to others. It is OOP api, and have a coverage ... **I DO NOT USE THIS FOR SPAM**, hope you will not too. | ||
**Credit:** | ||
Who deserves most ... https://github.com/mgp25/Instagram-API & @mgp25 for decrypting private keys from c++ libraries bundled within android app. | ||
**How to use this?** | ||
First you need to gain session: | ||
``` | ||
```javascript | ||
var Client = require('instagram-private-api').Client.V1; | ||
@@ -20,3 +35,3 @@ var device = new Client.Device('SAMSUNG_GALAXY_S2', 'someuser'); | ||
// Or go for login | ||
var promise = Client.Session.create(device, cookiePath,'someuser', 'somepassword'); | ||
var promise = Client.Session.create(device, cookiePath, 'someuser', 'somepassword'); | ||
@@ -28,2 +43,3 @@ promise.then(function(sessionInstance) { | ||
**Available APIs:** | ||
@@ -36,3 +52,3 @@ | ||
``` | ||
```javascript | ||
// Session Instance gained above | ||
@@ -57,2 +73,3 @@ var session = .... | ||
**Working with 'proxy like' server:** | ||
@@ -62,3 +79,3 @@ | ||
``` | ||
```javascript | ||
var server = require('instagram-private-api').ProxyServer; | ||
@@ -81,5 +98,7 @@ | ||
This will run server and socket server on address 0.0.0.0:8080 so you can access and do the same what you can do with instagram PRIVATE API. Except it is | ||
prettier :P. | ||
``` | ||
@@ -102,3 +121,4 @@ GET /v1 | ||
``` | ||
```javascript | ||
var ClientProxy = require('instagram-private-api').ProxyClient.V1; | ||
@@ -121,4 +141,5 @@ var server = new ClientProxy.Server('host', 'port', 'socket port'); | ||
Thanks for any support! Pull requests are of course welcome! | ||
var ClientV1 = require('../../../proxy-client/v1'); | ||
var Client = require('../../../client/v1'); | ||
var fixtures = require('../../fixtures'); | ||
var credentials = require('../../credentials.json'); | ||
var credentials = require('../../support').credentials(); | ||
var Promise = require('bluebird'); | ||
@@ -6,0 +6,0 @@ var should = require('should'); |
var ClientV1 = require('../../../proxy-client/v1'); | ||
var fixtures = require('../../fixtures'); | ||
var credentials = require('../../credentials.json'); | ||
var credentials = require('../../support').credentials(); | ||
var should = require('should'); | ||
@@ -5,0 +5,0 @@ var fs = require('fs') |
var Promise = require('bluebird'); | ||
var should = require('should'); | ||
var _ = require('underscore'); | ||
var credentials = require('../../credentials.json'); | ||
var credentials = require('../../support').credentials(); | ||
var sinon = require('sinon'); | ||
@@ -6,0 +6,0 @@ var fs = require('fs'); |
var Promise = require('bluebird'); | ||
var should = require('should'); | ||
var _ = require('underscore'); | ||
var credentials = require('../../credentials.json'); | ||
var credentials = require('../../support').credentials(); | ||
var sinon = require('sinon'); | ||
@@ -6,0 +6,0 @@ var fs = require('fs'); |
var Promise = require('bluebird'); | ||
var should = require('should'); | ||
var _ = require('underscore'); | ||
var credentials = require('../../credentials.json'); | ||
var credentials = require('../../support').credentials(); | ||
var sinon = require('sinon'); | ||
@@ -6,0 +6,0 @@ var fs = require('fs'); |
@@ -5,3 +5,3 @@ var should = require('should'); | ||
var ClientV1 = require('../proxy-client/v1'); | ||
var credentials = require('./credentials.json'); | ||
var credentials = require('./support').credentials(); | ||
var path = require('path'); | ||
@@ -8,0 +8,0 @@ |
var ClientV1 = require('../proxy-client/v1'); | ||
var credentials = require('./credentials.json'); | ||
var fixtures = require('./fixtures.json'); | ||
@@ -10,3 +9,13 @@ var gm = require('gm').subClass({imageMagick: true}); | ||
var request = require('request'); | ||
var _ = require('underscore'); | ||
exports.credentials = function() { | ||
return _.isString(process.env.CREDENTIALS) ? | ||
JSON.parse(process.env.CREDENTIALS) : | ||
require('./credentials.json'); | ||
} | ||
var credentials = exports.credentials(); | ||
var _session = null; | ||
@@ -13,0 +22,0 @@ |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
No License Found
License(Experimental) License information could not be found
Found 1 instance in 1 package
1421241
113
0
7393
138
22