Permalink
Browse files

[fix] changed HTTP to HTTPS

  • Loading branch information...
1 parent dcbc898 commit 5a82b637e3a7c6f6b91b9b83c53e09bf20fee5ed @3rd-Eden 3rd-Eden committed with mmalecki Aug 3, 2012
View
@@ -11,7 +11,7 @@ var nj = require('nodejitsu-api'),
var client = nj.createClient({
username: 'marak',
password: 'foobar',
- remoteUri: 'http://api.nodejitsu.com'
+ remoteUri: 'https://api.nodejitsu.com'
});
client.apps.list(function(err, result){
@@ -40,15 +40,15 @@ This method sets up a client for connecting to Nodejitsu's databases. Here's a m
var client = nj.createClient({
username: 'marak',
password: 'foobar',
- remoteUri: 'http://api.nodejitsu.com'
+ remoteUri: 'https://api.nodejitsu.com'
});
```
The options object contains three required properties:
* `username`: The username for your Nodejitsu account
* `password`: The password for your Nodejitsu account
-* `remoteUri`: The uri of the api host (typically [http://api.nodejitsu.com](http://api.nodejitsu.com)).
+* `remoteUri`: The uri of the api host (typically [https://api.nodejitsu.com](https://api.nodejitsu.com)).
### client
@@ -4,7 +4,7 @@ var nj = require('../lib/client'),
var client = nj.createClient({
username: 'marak',
password: 'mypassword',
- remoteUri: 'http://api.nodejitsu.com'
+ remoteUri: 'https://api.nodejitsu.com'
});
client.users.auth(function(err, result){
@@ -4,7 +4,7 @@ var nj = require('../lib/client'),
var client = nj.createClient({
username: 'marak',
password: 'foobar',
- remoteUri: 'http://api.nodejitsu.com'
+ remoteUri: 'https://api.nodejitsu.com'
});
client.keys.create('marak/keys/test-api-key', function(err, result){
@@ -4,7 +4,7 @@ var nj = require('../lib/client'),
var client = nj.createClient({
username: 'marak',
password: 'foobar',
- remoteUri: 'http://api.nodejitsu.com'
+ remoteUri: 'https://api.nodejitsu.com'
});
client.keys.create('marak/keys/test-ssh-key', { "type": "ssh", "value": "foobar" }, function(err, result){
@@ -4,7 +4,7 @@ var nj = require('../lib/client'),
var client = nj.createClient({
username: 'marak',
password: 'foobar',
- remoteUri: 'http://api.nodejitsu.com'
+ remoteUri: 'https://api.nodejitsu.com'
});
client.keys.destroy('marak/keys/test-ssh-key', function(err, result){
@@ -4,7 +4,7 @@ var nj = require('../lib/client'),
var client = nj.createClient({
username: 'marak',
password: 'foobar',
- remoteUri: 'http://api.nodejitsu.com'
+ remoteUri: 'https://api.nodejitsu.com'
});
@@ -4,7 +4,7 @@ var nj = require('../lib/client'),
var client = nj.createClient({
username: 'marak',
password: 'foobar',
- remoteUri: 'http://api.nodejitsu.com'
+ remoteUri: 'https://api.nodejitsu.com'
});
client.keys.view('marak/keys/my-key', function(err, result){
@@ -3,7 +3,7 @@ var nj = require('../lib/client');
var client = nj.createClient({
username: 'marak',
password: 'foo',
- remoteUri: 'http://api.nodejitsu.com'
+ remoteUri: 'https://api.nodejitsu.com'
});
client.logs.byApp('marak/hellonode', 100, function(err, result){
@@ -3,7 +3,7 @@ var nj = require('../lib/client');
var client = nj.createClient({
username: 'marak',
password: 'foo',
- remoteUri: 'http://api.nodejitsu.com'
+ remoteUri: 'https://api.nodejitsu.com'
});
client.logs.byUser('marak', 100, function(err, result){
@@ -4,7 +4,7 @@ var nj = require('../lib/client'),
var client = nj.createClient({
username: 'marak',
password: 'foobar',
- remoteUri: 'http://api.nodejitsu.com'
+ remoteUri: 'https://api.nodejitsu.com'
});
client.apps.list('marak', function(err, result){
@@ -4,7 +4,7 @@ var nj = require('../lib/client'),
var client = nj.createClient({
username: 'marak',
password: 'foobar',
- remoteUri: 'http://api.nodejitsu.com'
+ remoteUri: 'https://api.nodejitsu.com'
});
client.keys.list('marak', function(err, result){
@@ -13,4 +13,4 @@ client.keys.list('marak', function(err, result){
return;
}
console.log(JSON.stringify(result, null, 2, true));
-});
+});
@@ -3,7 +3,7 @@ var nj = require('../lib/client');
var client = nj.createClient({
username: 'marak',
password: 'foobar',
- remoteUri: 'http://api.nodejitsu.com'
+ remoteUri: 'https://api.nodejitsu.com'
});
client.apps.restart('marak/hellonode', function(err, result){
@@ -4,7 +4,7 @@ var nj = require('../lib/client'),
var client = nj.createClient({
username: 'marak',
password: 'foobar',
- remoteUri: 'http://api.nodejitsu.com'
+ remoteUri: 'https://api.nodejitsu.com'
});
@@ -3,7 +3,7 @@ var nj = require('../lib/client');
var client = nj.createClient({
username: 'marak',
password: 'foobar',
- remoteUri: 'http://api.nodejitsu.com'
+ remoteUri: 'https://api.nodejitsu.com'
});
client.apps.start('marak/hellonode', function(err, result){
@@ -3,7 +3,7 @@ var nj = require('../lib/client');
var client = nj.createClient({
username: 'marak',
password: 'foobar',
- remoteUri: 'http://api.nodejitsu.com'
+ remoteUri: 'https://api.nodejitsu.com'
});
client.apps.stop('marak/hellonode', function(err, result){
@@ -6,7 +6,7 @@ var vows = require('vows'),
vows.describe('apps').addBatch(makeApiCall(
'apps list',
function setup () {
- nock('http://api.mockjitsu.com')
+ nock('https://api.mockjitsu.com')
.get('/apps/tester')
.reply(200, {
apps: []
@@ -15,7 +15,7 @@ vows.describe('apps').addBatch(makeApiCall(
)).addBatch(makeApiCall(
'apps list myUser',
function setup () {
- nock('http://api.mockjitsu.com')
+ nock('https://api.mockjitsu.com')
.get('/apps/myUser')
.reply(200, {
apps: []
@@ -25,14 +25,14 @@ vows.describe('apps').addBatch(makeApiCall(
'apps create',
{ name: 'myApp' },
function setup () {
- nock('http://api.mockjitsu.com')
+ nock('https://api.mockjitsu.com')
.post('/apps/tester/myApp', { name: 'myApp' })
.reply(200, {}, { 'x-powered-by': 'Nodejitsu' })
}
)).addBatch(makeApiCall(
'apps view myApp',
function setup () {
- nock('http://api.mockjitsu.com')
+ nock('https://api.mockjitsu.com')
.get('/apps/tester/myApp')
.reply(200, {
app: {}
@@ -41,7 +41,7 @@ vows.describe('apps').addBatch(makeApiCall(
)).addBatch(makeApiCall(
'apps view myUser/myApp',
function setup () {
- nock('http://api.mockjitsu.com')
+ nock('https://api.mockjitsu.com')
.get('/apps/myUser/myApp')
.reply(200, {
app: {}
@@ -51,14 +51,14 @@ vows.describe('apps').addBatch(makeApiCall(
'apps update myUser/myApp',
{ foo: 'bar'},
function setup () {
- nock('http://api.mockjitsu.com')
+ nock('https://api.mockjitsu.com')
.put('/apps/myUser/myApp', { foo: 'bar' })
.reply(200, {}, { 'x-powered-by': 'Nodejitsu' })
}
)).addBatch(makeApiCall(
'apps destroy myUser/myApp',
function setup () {
- nock('http://api.mockjitsu.com')
+ nock('https://api.mockjitsu.com')
.destroy('/apps/myUser/myApp')
.reply(200, {
apps: []
@@ -67,29 +67,29 @@ vows.describe('apps').addBatch(makeApiCall(
)).addBatch(makeApiCall(
'apps start myApp',
function setup () {
- nock('http://api.mockjitsu.com')
+ nock('https://api.mockjitsu.com')
.post('/apps/tester/myApp/start', {})
.reply(200, {}, { 'x-powered-by': 'Nodejitsu' })
}
)).addBatch(makeApiCall(
'apps restart myApp',
function setup () {
- nock('http://api.mockjitsu.com')
+ nock('https://api.mockjitsu.com')
.post('/apps/tester/myApp/restart', {})
.reply(200, {}, { 'x-powered-by': 'Nodejitsu' })
}
)).addBatch(makeApiCall(
'apps stop myApp',
function setup () {
- nock('http://api.mockjitsu.com')
+ nock('https://api.mockjitsu.com')
.post('/apps/tester/myApp/stop', {})
.reply(200, {}, { 'x-powered-by': 'Nodejitsu' })
}
)).addBatch(makeApiCall(
'apps available',
{ name: 'myApp' },
function setup () {
- nock('http://api.mockjitsu.com')
+ nock('https://api.mockjitsu.com')
.post('/apps/tester/myApp/available', { name: 'myApp'})
.reply(200, {}, { 'x-powered-by': 'Nodejitsu' })
}
@@ -6,28 +6,28 @@ var vows = require('vows'),
vows.describe('databases').addBatch(makeApiCall(
'databases create couch chair',
function setup () {
- nock('http://api.mockjitsu.com')
+ nock('https://api.mockjitsu.com')
.post('/databases/tester/chair', { type: 'couch'})
.reply(200, {}, { 'x-powered-by': 'Nodejitsu' })
}
)).addBatch(makeApiCall(
'databases get chair',
function setup () {
- nock('http://api.mockjitsu.com')
+ nock('https://api.mockjitsu.com')
.get('/databases/tester/chair')
.reply(200, {}, { 'x-powered-by': 'Nodejitsu' })
}
)).addBatch(makeApiCall(
'databases list',
function setup () {
- nock('http://api.mockjitsu.com')
+ nock('https://api.mockjitsu.com')
.get('/databases/tester')
.reply(200, {}, { 'x-powered-by': 'Nodejitsu' })
}
)).addBatch(makeApiCall(
'databases destroy chair',
function setup () {
- nock('http://api.mockjitsu.com')
+ nock('https://api.mockjitsu.com')
.delete('/databases/tester/chair', {})
.reply(200, {}, { 'x-powered-by': 'Nodejitsu' })
}
@@ -6,7 +6,7 @@ var vows = require('vows'),
vows.describe('logs').addBatch(makeApiCall(
'logs byApp myApp 50',
function setup () {
- nock('http://api.mockjitsu.com')
+ nock('https://api.mockjitsu.com')
.post('/logs/tester/myApp', {
from: "NOW-1DAY",
until: "NOW",
@@ -17,7 +17,7 @@ vows.describe('logs').addBatch(makeApiCall(
)).addBatch(makeApiCall(
'logs byUser myUser 50',
function setup () {
- nock('http://api.mockjitsu.com')
+ nock('https://api.mockjitsu.com')
.post('/logs/myUser', {
from: "NOW-1DAY",
until: "NOW",
@@ -7,21 +7,21 @@ var vows = require('vows'),
vows.describe('snapshots').addBatch(makeApiCall(
'snapshots list myApp',
function setup () {
- nock('http://api.mockjitsu.com')
+ nock('https://api.mockjitsu.com')
.get('/apps/tester/myApp/snapshots')
.reply(200, {}, { 'x-powered-by': 'Nodejitsu' })
}
)).addBatch(makeApiCall(
'snapshots destroy myApp v0.0.0',
function setup () {
- nock('http://api.mockjitsu.com')
+ nock('https://api.mockjitsu.com')
.delete('/apps/tester/myApp/snapshots/v0.0.0', {})
.reply(200, {}, { 'x-powered-by': 'Nodejitsu' })
}
)).addBatch(makeApiCall(
'snapshots activate myApp v0.0.0',
function setup () {
- nock('http://api.mockjitsu.com')
+ nock('https://api.mockjitsu.com')
.post('/apps/tester/myApp/snapshots/v0.0.0/activate', {})
.reply(200, {}, { 'x-powered-by': 'Nodejitsu' })
}
@@ -31,7 +31,7 @@ vows.describe('snapshots').addBatch(makeApiCall(
path.join(__dirname, '../fixtures/snapshot.tgz')
].join(' '),
function setup () {
- nock('http://api.mockjitsu.com')
+ nock('https://api.mockjitsu.com')
.post('/apps/tester/myApp/snapshots/v0.0.0', 'This is only a test.\n')
.reply(200, {}, { 'x-powered-by': 'Nodejitsu' })
}
@@ -7,44 +7,44 @@ vows.describe('users').addBatch(makeApiCall(
'users create',
{ username: 'adam' },
function setup () {
- nock('http://api.mockjitsu.com')
+ nock('https://api.mockjitsu.com')
.post('/users/adam', { username: 'adam' })
.reply(200, {}, { 'x-powered-by': 'Nodejitsu' })
}
)).addBatch(makeApiCall(
'users available eve',
function setup () {
- nock('http://api.mockjitsu.com')
+ nock('https://api.mockjitsu.com')
.get('/users/eve/available')
.reply(200, {}, { 'x-powered-by': 'Nodejitsu' })
}
)).addBatch(makeApiCall(
'users view abraham',
function setup () {
- nock('http://api.mockjitsu.com')
+ nock('https://api.mockjitsu.com')
.get('/users/abraham')
.reply(200, {}, { 'x-powered-by': 'Nodejitsu' })
}
)).addBatch(makeApiCall(
'users confirm',
{ username: 'noah' },
function setup () {
- nock('http://api.mockjitsu.com')
+ nock('https://api.mockjitsu.com')
.post('/users/noah/confirm', { username: 'noah' })
.reply(200, {}, { 'x-powered-by': 'Nodejitsu' })
}
)).addBatch(makeApiCall(
'users forgot job',
function setup () {
- nock('http://api.mockjitsu.com')
+ nock('https://api.mockjitsu.com')
.post('/users/job/forgot', {})
.reply(200, {}, { 'x-powered-by': 'Nodejitsu' })
}
)).addBatch(makeApiCall(
'users update moses',
{ prophet: true },
function setup () {
- nock('http://api.mockjitsu.com')
+ nock('https://api.mockjitsu.com')
.put('/users/moses', { prophet: true})
.reply(200, {}, { 'x-powered-by': 'Nodejitsu' })
}
View
@@ -2,7 +2,7 @@ var createClient = require('../lib/client').createClient,
client = createClient({
username: 'tester',
password: 'password',
- remoteUri: 'http://api.mockjitsu.com'
+ remoteUri: 'https://api.mockjitsu.com'
}),
assert = require('assert');

0 comments on commit 5a82b63

Please sign in to comment.