Skip to content

Commit

Permalink
fix staging api url.
Browse files Browse the repository at this point in the history
  • Loading branch information
moisesdelacruz committed Jun 26, 2020
1 parent d1d0823 commit 6f73c2f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const TaurosAPI = require('tauros-api-nodejs')

const api_key = '7c6a0aa1ee3af97a9a796dc0ee9ec558e762f397'

const api_secret = 'a35e67131c5fc4d5894825781eb3c1033ac6d8248745d5d8c28a6689008f5773'
const api_secret = 'ZmE5ZGJjYTNhMjJjMTc0NjBmZGQ3NzQzsgelZjUwNGM3Mzk3OWRlYTBiODU1MzU0YmJhOThmOTRhOTI3NjdhMw=='

const tauros = new TaurosAPI(api_key, api_secret, staging=true)

Expand Down
2 changes: 1 addition & 1 deletion lib/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const crypto = require('crypto');
const fetch = require('node-fetch');

const URL_API = 'https://api.tauros.io'
const URL_API_STAGING = 'https://staging.api.tauros.io'
const URL_API_STAGING = 'https://api.staging.tauros.io'

class TaurosAPI {
constructor(api_key, api_secret, staging=false) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tauros-api",
"version": "1.0.1",
"version": "1.0.2",
"description": "This module is for connection with Tauros API.",
"main": "index.js",
"directories": {
Expand Down
8 changes: 4 additions & 4 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe("Request GET", () => {
}
let path = '/api/v1/profiles/';

nock('https://staging.api.tauros.io').get(path).reply(200, res_data)
nock('https://api.staging.tauros.io').get(path).reply(200, res_data)

it("lets you mock requests, and assert on the results", async () => {
let response = await tauros.get(path);
Expand All @@ -66,7 +66,7 @@ describe("Request POST", () => {
}
let path = '/api/v1/trading/placeorder/';

nock('https://staging.api.tauros.io').post(path).reply(200, res_data)
nock('https://api.staging.tauros.io').post(path).reply(200, res_data)

let data = {
market: "BTC-MXN",
Expand All @@ -93,7 +93,7 @@ describe("Request PATCH", () => {
}
let path = '/api/v1/profiles/';

nock('https://staging.api.tauros.io').patch(path).reply(200, res_data)
nock('https://api.staging.tauros.io').patch(path).reply(200, res_data)

let data = {
phone_number: '+525523236412'
Expand All @@ -116,7 +116,7 @@ describe("Request PUT", () => {
}
let path = '/api/v1/profiles/';

nock('https://staging.api.tauros.io').put(path).reply(200, res_data)
nock('https://api.staging.tauros.io').put(path).reply(200, res_data)

let data = res_data;

Expand Down

0 comments on commit 6f73c2f

Please sign in to comment.