Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
C
Challonge
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Challonge
Commits
a8c818eb
Commit
a8c818eb
authored
Mar 19, 2017
by
Aaron Tidwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update to const/let and resolve formatting issues
parent
91559004
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
145 additions
and
137 deletions
+145
-137
README.md
README.md
+15
-16
lib/api/client.js
lib/api/client.js
+52
-55
lib/api/error-handler.js
lib/api/error-handler.js
+12
-10
lib/api/matches.js
lib/api/matches.js
+13
-8
lib/api/participants.js
lib/api/participants.js
+16
-11
lib/api/tournaments.js
lib/api/tournaments.js
+18
-17
lib/challonge.js
lib/challonge.js
+17
-18
lib/util.js
lib/util.js
+0
-0
package.json
package.json
+2
-2
No files found.
README.md
View file @
a8c818eb
...
@@ -12,15 +12,14 @@ $ npm install challonge --save
...
@@ -12,15 +12,14 @@ $ npm install challonge --save
var
challonge
=
require
(
'
challonge
'
);
var
challonge
=
require
(
'
challonge
'
);
var
client
=
challonge
.
createClient
({
var
client
=
challonge
.
createClient
({
apiKey
:
'
***yourAPIKey***
'
apiKey
:
'
***yourAPIKey***
'
});
});
client
.
tournaments
.
index
({
client
.
tournaments
.
index
({
callback
:
function
(
err
,
data
){
callback
:
function
(
err
,
data
){
if
(
err
)
{
console
.
log
(
err
);
return
;
}
if
(
err
)
{
console
.
log
(
err
);
return
;
}
console
.
log
(
data
);
console
.
log
(
data
);
}
}
});
});
```
```
...
@@ -31,20 +30,20 @@ var challonge = require('challonge');
...
@@ -31,20 +30,20 @@ var challonge = require('challonge');
// create a new instance of the client
// create a new instance of the client
var
client
=
challonge
.
createClient
({
var
client
=
challonge
.
createClient
({
apiKey
:
'
***yourAPIKey***
'
,
apiKey
:
'
***yourAPIKey***
'
,
});
});
// create a tournament
// create a tournament
client
.
tournaments
.
create
({
client
.
tournaments
.
create
({
tournament
:
{
tournament
:
{
name
:
'
new_tournament_name
'
,
name
:
'
new_tournament_name
'
,
url
:
'
new_tournament_url
'
,
url
:
'
new_tournament_url
'
,
tournamentType
:
'
single elimination
'
,
tournamentType
:
'
single elimination
'
,
},
},
callback
:
function
(
err
,
data
){
callback
:
function
(
err
,
data
){
if
(
err
)
{
console
.
log
(
err
);
return
;
}
if
(
err
)
{
console
.
log
(
err
);
return
;
}
console
.
log
(
data
);
console
.
log
(
data
);
}
}
});
});
```
```
...
...
lib/api/client.js
View file @
a8c818eb
'
use strict
'
;
const
qs
=
require
(
'
querystring
'
);
const
https
=
require
(
'
https
'
);
var
qs
=
require
(
'
querystring
'
);
const
errorHandler
=
require
(
'
./error-handler
'
);
var
https
=
require
(
'
https
'
);
var
errorHandler
=
require
(
'
./error-handler
'
);
/**
* @class Client(options)
/*
* @param {object} options configuration options for this instance
### function Client (options)
* @description
#### @options {Object} Options for this instance
* Constructor function for the Client base responsible for communicating with Challonge API
Constructor function for the Client base responsible
*/
for communicating with Challonge API
const
Client
=
exports
.
Client
=
function
(
options
)
{
*/
var
Client
=
exports
.
Client
=
function
(
options
)
{
this
.
options
=
options
||
{};
this
.
options
=
options
||
{};
//defaults - todo convert to an object merge
//
defaults - todo convert to an object merge
if
(
!
this
.
options
.
version
)
{
if
(
!
this
.
options
.
version
)
{
this
.
options
.
version
=
1
;
this
.
options
.
version
=
1
;
}
}
...
@@ -27,7 +25,7 @@ var Client = exports.Client = function(options) {
...
@@ -27,7 +25,7 @@ var Client = exports.Client = function(options) {
// add a getter to the options passed in - DO NOT mess with instance configs in resources
// add a getter to the options passed in - DO NOT mess with instance configs in resources
if
(
typeof
this
.
options
.
get
!==
'
function
'
)
{
if
(
typeof
this
.
options
.
get
!==
'
function
'
)
{
this
.
options
.
get
=
function
(
key
)
{
this
.
options
.
get
=
function
(
key
)
{
// not an arrow function to maintain "this" reference
return
this
[
key
];
return
this
[
key
];
};
};
}
}
...
@@ -35,17 +33,14 @@ var Client = exports.Client = function(options) {
...
@@ -35,17 +33,14 @@ var Client = exports.Client = function(options) {
// serialize nested params to tournament[name] style
// serialize nested params to tournament[name] style
function
serializeProperties
(
obj
)
{
function
serializeProperties
(
obj
)
{
var
compiledParams
=
''
;
let
compiledParams
=
''
;
var
serializedProperties
=
[];
let
serializedProperties
=
[];
for
(
var
prop
in
obj
)
{
for
(
let
prop
in
obj
)
{
if
(
obj
.
hasOwnProperty
(
prop
))
{
if
(
obj
.
hasOwnProperty
(
prop
)
&&
typeof
obj
[
prop
]
===
'
object
'
&&
obj
[
prop
]
!==
null
)
{
if
(
typeof
(
obj
[
prop
])
===
'
object
'
&&
obj
[
prop
]
!==
null
)
{
for
(
let
attr
in
obj
[
prop
])
{
for
(
var
attr
in
obj
[
prop
])
{
compiledParams
+=
'
&
'
+
prop
+
'
[
'
+
attr
+
'
]=
'
+
encodeURIComponent
(
obj
[
prop
][
attr
]);
compiledParams
+=
'
&
'
;
compiledParams
+=
prop
+
'
[
'
+
attr
+
'
]=
'
+
encodeURIComponent
(
obj
[
prop
][
attr
]);
}
serializedProperties
.
push
(
prop
);
}
}
serializedProperties
.
push
(
prop
);
}
}
}
}
return
{
return
{
...
@@ -55,31 +50,29 @@ function serializeProperties(obj) {
...
@@ -55,31 +50,29 @@ function serializeProperties(obj) {
}
}
// resources generate props internal to https requests
// resources generate props internal to https requests
var
propertiesToDelete
=
[
'
callback
'
,
'
path
'
,
'
method
'
];
let
propertiesToDelete
=
[
'
callback
'
,
'
path
'
,
'
method
'
];
function
camelToUnderscore
(
str
)
{
function
camelToUnderscore
(
str
)
{
return
str
.
replace
(
/
\W
+/g
,
'
-
'
)
return
str
.
replace
(
/
\W
+/g
,
'
-
'
)
.
replace
(
/
([
a-z
\d])([
A-Z
])
/g
,
'
$1_$2
'
).
toLowerCase
();
.
replace
(
/
([
a-z
\d])([
A-Z
])
/g
,
'
$1_$2
'
)
.
toLowerCase
();
}
}
function
UnderscoreToCamel
(
str
)
{
function
UnderscoreToCamel
(
str
)
{
return
str
.
replace
(
/_
([
a-z
])
/g
,
function
(
g
)
{
return
str
.
replace
(
/_
([
a-z
])
/g
,
g
=>
g
[
1
].
toUpperCase
());
return
g
[
1
].
toUpperCase
();
});
}
}
function
convertProperties
(
obj
,
converionFunction
)
{
function
convertProperties
(
obj
,
conver
s
ionFunction
)
{
//determine which we want to check with to see if we should convert
//
determine which we want to check with to see if we should convert
var
checkRegex
=
conver
ionFunction
===
UnderscoreToCamel
?
/_/
:
/
[
A-Z
]
/
;
const
checkRegex
=
convers
ionFunction
===
UnderscoreToCamel
?
/_/
:
/
[
A-Z
]
/
;
for
(
var
prop
in
obj
)
{
for
(
let
prop
in
obj
)
{
if
(
obj
.
hasOwnProperty
(
prop
))
{
if
(
obj
.
hasOwnProperty
(
prop
))
{
//objects recurse
//
objects recurse
if
(
typeof
obj
[
prop
]
===
'
object
'
&&
obj
[
prop
]
!==
null
)
{
if
(
typeof
obj
[
prop
]
===
'
object
'
&&
obj
[
prop
]
!==
null
)
{
obj
[
conver
ionFunction
(
prop
)]
=
convertProperties
(
obj
[
prop
],
conver
ionFunction
);
obj
[
conver
sionFunction
(
prop
)]
=
convertProperties
(
obj
[
prop
],
convers
ionFunction
);
}
else
if
(
prop
.
search
(
checkRegex
)
>
-
1
)
{
}
else
if
(
prop
.
search
(
checkRegex
)
>
-
1
)
{
obj
[
converionFunction
(
prop
)]
=
obj
[
prop
];
obj
[
conversionFunction
(
prop
)]
=
obj
[
prop
];
//remove it
delete
obj
[
prop
];
// remove it
delete
obj
[
prop
];
}
}
//otherwise leave it alone
//otherwise leave it alone
...
@@ -89,7 +82,7 @@ function convertProperties(obj, converionFunction) {
...
@@ -89,7 +82,7 @@ function convertProperties(obj, converionFunction) {
}
}
Client
.
prototype
.
setSubdomain
=
function
(
subdomain
)
{
Client
.
prototype
.
setSubdomain
=
function
(
subdomain
)
{
//generate the subdomain URL string if there is one
//
generate the subdomain URL string if there is one
if
(
!
subdomain
)
{
if
(
!
subdomain
)
{
this
.
options
.
subdomain
=
''
;
this
.
options
.
subdomain
=
''
;
}
else
if
(
subdomain
[
subdomain
.
length
-
1
]
!==
'
-
'
)
{
}
else
if
(
subdomain
[
subdomain
.
length
-
1
]
!==
'
-
'
)
{
...
@@ -101,11 +94,11 @@ Client.prototype.setSubdomain = function(subdomain) {
...
@@ -101,11 +94,11 @@ Client.prototype.setSubdomain = function(subdomain) {
// cleans the passed in object, generates the API url/query-string, makes the request, delegates errors and calls callbacks
// cleans the passed in object, generates the API url/query-string, makes the request, delegates errors and calls callbacks
Client
.
prototype
.
makeRequest
=
function
(
obj
)
{
Client
.
prototype
.
makeRequest
=
function
(
obj
)
{
var
self
=
this
;
const
self
=
this
;
// cache vars that are about to be removed
// cache vars that are about to be removed
var
callback
=
obj
.
callback
;
const
callback
=
obj
.
callback
;
var
path
=
obj
.
path
;
const
method
=
obj
.
method
;
var
method
=
obj
.
method
;
let
path
=
obj
.
path
;
// normalize the rest of the properties
// normalize the rest of the properties
obj
=
convertProperties
(
obj
,
camelToUnderscore
);
obj
=
convertProperties
(
obj
,
camelToUnderscore
);
...
@@ -113,25 +106,29 @@ Client.prototype.makeRequest = function(obj) {
...
@@ -113,25 +106,29 @@ Client.prototype.makeRequest = function(obj) {
// Add on the api key
// Add on the api key
obj
.
api_key
=
this
.
options
.
get
(
'
apiKey
'
);
//convert for url
obj
.
api_key
=
this
.
options
.
get
(
'
apiKey
'
);
//convert for url
obj
.
cache_bust
=
Math
.
random
();
obj
.
cache_bust
=
Math
.
random
();
//serialize the properties
var
serialized
=
serializeProperties
(
obj
);
// serialize the properties
var
compiledParams
=
serialized
.
serialized
;
const
serialized
=
serializeProperties
(
obj
);
//merge the stuff to remove
// get the non-standard-formatted properties (this is to support the tournament[score] kind of params the api expects)
const
compiledParams
=
serialized
.
serialized
;
// merge the stuff to remove
propertiesToDelete
=
propertiesToDelete
.
concat
(
serialized
.
properties
);
propertiesToDelete
=
propertiesToDelete
.
concat
(
serialized
.
properties
);
// remove params
// remove params
propertiesToDelete
.
forEach
(
function
(
prop
)
{
propertiesToDelete
.
forEach
(
(
prop
)
=>
{
delete
obj
[
prop
];
delete
obj
[
prop
];
});
});
// generate path
// generate path
var
versionPaths
=
{
const
versionPaths
=
{
1
:
'
/v1/tournaments
'
1
:
'
/v1/tournaments
'
};
};
path
=
versionPaths
[
this
.
options
.
get
(
'
version
'
)]
+
(
path
?
path
:
''
)
+
'
.
'
+
this
.
options
.
get
(
'
format
'
)
+
'
?
'
+
qs
.
stringify
(
obj
)
+
compiledParams
;
path
=
versionPaths
[
this
.
options
.
get
(
'
version
'
)]
+
(
path
?
path
:
''
)
+
'
.
'
+
this
.
options
.
get
(
'
format
'
)
+
'
?
'
+
qs
.
stringify
(
obj
)
+
compiledParams
;
// create options for the https call
// create options for the https call
var
options
=
{
const
options
=
{
hostname
:
'
api.challonge.com
'
,
hostname
:
'
api.challonge.com
'
,
path
:
path
,
path
:
path
,
method
:
method
,
method
:
method
,
...
@@ -140,14 +137,14 @@ Client.prototype.makeRequest = function(obj) {
...
@@ -140,14 +137,14 @@ Client.prototype.makeRequest = function(obj) {
}
}
};
};
var
req
=
https
.
request
(
options
,
function
(
res
)
{
const
req
=
https
.
request
(
options
,
(
res
)
=>
{
// store the chunked data as it comes back
// store the chunked data as it comes back
var
resData
=
''
;
let
resData
=
''
;
res
.
on
(
'
data
'
,
function
(
chunk
)
{
res
.
on
(
'
data
'
,
(
chunk
)
=>
{
resData
+=
chunk
;
resData
+=
chunk
;
});
});
res
.
on
(
'
end
'
,
function
()
{
res
.
on
(
'
end
'
,
()
=>
{
// error
// error
if
(
res
.
statusCode
!==
200
)
{
if
(
res
.
statusCode
!==
200
)
{
errorHandler
.
handle
(
res
,
resData
,
callback
,
self
.
options
.
get
(
'
format
'
));
errorHandler
.
handle
(
res
,
resData
,
callback
,
self
.
options
.
get
(
'
format
'
));
...
...
lib/api/error-handler.js
View file @
a8c818eb
// Response Codes
/**
// The following HTTP response codes are issued by the API. All other codes are the result of a request not reaching the application.
* Response code handler
* @param {object} res the http response object
// 200 - OK
* @param {object} resData the data contained in the response
// 401 - Invalid API key
* @param {Function} callback the users callback function to call
// 404 - Object not found within your account scope
* @param {string} format the format of the response data (json, xml, etc)
// 422 - Validation error(s) for create or update method
* @description
* The following HTTP response codes are issued by the API.
* All other codes are the result of a request not reaching the application.
*/
exports
.
handle
=
function
(
res
,
resData
,
callback
,
format
)
{
exports
.
handle
=
function
(
res
,
resData
,
callback
,
format
)
{
var
err
;
let
err
;
// 401 - Invalid API key
// 401 - Invalid API key
if
(
res
.
statusCode
===
401
)
{
if
(
res
.
statusCode
===
401
)
{
err
=
{
err
=
{
...
@@ -34,7 +36,7 @@ exports.handle = function(res, resData, callback, format) {
...
@@ -34,7 +36,7 @@ exports.handle = function(res, resData, callback, format) {
// 422 - Validation error(s) for create or update method
// 422 - Validation error(s) for create or update method
if
(
res
.
statusCode
===
422
)
{
if
(
res
.
statusCode
===
422
)
{
if
(
format
==
'
json
'
)
{
if
(
format
==
=
'
json
'
)
{
resData
=
JSON
.
parse
(
resData
);
resData
=
JSON
.
parse
(
resData
);
}
}
err
=
{
err
=
{
...
...
lib/api/matches.js
View file @
a8c818eb
// index GET tournaments/:tournament/matches
const
util
=
require
(
'
util
'
);
// show GET tournaments/:tournament/matches/:match_id
const
Client
=
require
(
'
./client
'
).
Client
;
// update PUT tournaments/:tournament/matches/:match_id
var
util
=
require
(
'
util
'
);
/**
var
Client
=
require
(
'
./client
'
).
Client
;
* @class Matches(options)
* @param {object} options configuration options for this instance
var
Matches
=
exports
.
Matches
=
function
(
options
)
{
* @description
* Constructor function for the class to query Matches endpoints
* index GET tournaments/:tournament/matches
* show GET tournaments/:tournament/matches/:match_id
* update PUT tournaments/:tournament/matches/:match_id
*/
const
Matches
=
exports
.
Matches
=
function
(
options
)
{
Client
.
call
(
this
,
options
);
// call parent constructor
Client
.
call
(
this
,
options
);
// call parent constructor
};
};
//
I
nherit from Client base object
//
i
nherit from Client base object
util
.
inherits
(
Matches
,
Client
);
util
.
inherits
(
Matches
,
Client
);
Matches
.
prototype
.
index
=
function
(
obj
)
{
Matches
.
prototype
.
index
=
function
(
obj
)
{
...
...
lib/api/participants.js
View file @
a8c818eb
// index GET tournaments/:tournament/participants
const
util
=
require
(
'
util
'
);
// create POST tournaments/:tournament/participants
const
Client
=
require
(
'
./client
'
).
Client
;
// show GET tournaments/:tournament/participants/:participant_id
// update PUT tournaments/:tournament/participants/:participant_id
// destroy DELETE tournaments/:tournament/participants/:participant_id
// randomize GET tournaments/:tournament/participants/randomize
var
util
=
require
(
'
util
'
);
/**
var
Client
=
require
(
'
./client
'
).
Client
;
* @class Participants(options)
* @param {object} options configuration options for this instance
var
Participants
=
exports
.
Participants
=
function
(
options
)
{
* @description
* Constructor function for the class to query Participants endpoints
* index GET tournaments/:tournament/participants
* create POST tournaments/:tournament/participants
* show GET tournaments/:tournament/participants/:participant_id
* update PUT tournaments/:tournament/participants/:participant_id
* destroy DELETE tournaments/:tournament/participants/:participant_id
* randomize GET tournaments/:tournament/participants/randomize
*/
const
Participants
=
exports
.
Participants
=
function
(
options
)
{
Client
.
call
(
this
,
options
);
// call parent constructor
Client
.
call
(
this
,
options
);
// call parent constructor
};
};
//
I
nherit from Client base object
//
i
nherit from Client base object
util
.
inherits
(
Participants
,
Client
);
util
.
inherits
(
Participants
,
Client
);
Participants
.
prototype
.
index
=
function
(
obj
)
{
Participants
.
prototype
.
index
=
function
(
obj
)
{
...
...
lib/api/tournaments.js
View file @
a8c818eb
// // index GET tournaments
const
util
=
require
(
'
util
'
);
// // create POST tournaments
const
Client
=
require
(
'
./client
'
).
Client
;
// // show GET tournaments/:tournament
// // update PUT tournaments/:tournament
// // destroy DELETE tournaments/:tournament
// // start POST tournaments/:tournament/start
// // finalize POST tournaments/:tournament/finalize
// // reset POST tournaments/:tournament/reset
var
util
=
require
(
'
util
'
);
/**
var
Client
=
require
(
'
./client
'
).
Client
;
* @class Participants(options)
* @param {object} options configuration options for this instance
var
Tournaments
=
exports
.
Tournaments
=
function
(
options
)
{
* @description
* Constructor function for the class to query Participants endpoints
* index GET tournaments
* create POST tournaments
* show GET tournaments/:tournament
* update PUT tournaments/:tournament
* destroy DELETE tournaments/:tournament
* start POST tournaments/:tournament/start
* finalize POST tournaments/:tournament/finalize
* reset POST tournaments/:tournament/reset
*/
const
Tournaments
=
exports
.
Tournaments
=
function
(
options
)
{
Client
.
call
(
this
,
options
);
// call parent constructor
Client
.
call
(
this
,
options
);
// call parent constructor
this
.
getRawSubdomain
=
function
()
{
this
.
getRawSubdomain
=
function
()
{
...
@@ -22,13 +27,11 @@ var Tournaments = exports.Tournaments = function(options) {
...
@@ -22,13 +27,11 @@ var Tournaments = exports.Tournaments = function(options) {
};
};
};
};
//
I
nherit from Client base object
//
i
nherit from Client base object
util
.
inherits
(
Tournaments
,
Client
);
util
.
inherits
(
Tournaments
,
Client
);
Tournaments
.
prototype
.
index
=
function
(
obj
)
{
Tournaments
.
prototype
.
index
=
function
(
obj
)
{
obj
.
method
=
'
GET
'
;
obj
.
method
=
'
GET
'
;
// generate the subdomain property from the subdomain
// url we generate in the client constructor
if
(
this
.
getRawSubdomain
())
{
if
(
this
.
getRawSubdomain
())
{
obj
.
subdomain
=
this
.
getRawSubdomain
();
obj
.
subdomain
=
this
.
getRawSubdomain
();
}
}
...
@@ -36,8 +39,6 @@ Tournaments.prototype.index = function(obj) {
...
@@ -36,8 +39,6 @@ Tournaments.prototype.index = function(obj) {
};
};
Tournaments
.
prototype
.
create
=
function
(
obj
)
{
Tournaments
.
prototype
.
create
=
function
(
obj
)
{
// generate the subdomain property from the subdomain
// url we generate in the client constructor
if
(
this
.
getRawSubdomain
())
{
if
(
this
.
getRawSubdomain
())
{
obj
.
tournament
.
subdomain
=
this
.
getRawSubdomain
();
obj
.
tournament
.
subdomain
=
this
.
getRawSubdomain
();
}
}
...
...
lib/challonge.js
View file @
a8c818eb
'
use strict
'
;
const
endpoints
=
[
'
Client
'
,
'
Tournaments
'
,
'
Participants
'
,
'
Matches
'
]
;
var
parts
=
[
'
Client
'
,
'
Tournaments
'
,
'
Participants
'
,
'
Matches
'
];
endpoints
.
forEach
(
endpointName
=>
{
exports
[
endpointName
]
=
require
(
'
./api/
'
+
endpointName
.
toLowerCase
())[
endpointName
];
parts
.
forEach
(
function
forEach
(
k
)
{
exports
[
k
]
=
require
(
'
./api/
'
+
k
.
toLowerCase
())[
k
];
});
});
/*
/**
### function createClient(options)
* @function createClient(options)
#### @options {Object} options for the clients
* @param {object} options configuration options for this instance
Generates a new API client.
* @returns {object} new api client instance
*/
* @description
* Generates a new API client.
*/
exports
.
createClient
=
function
createClient
(
options
)
{
exports
.
createClient
=
function
createClient
(
options
)
{
var
client
=
{};
const
client
=
{};
// require each lib in ./api and instantiate a new instance of each object, passing the options we were passed
// require each lib in ./api and instantiate a new instance of each object, passing the options we were passed
parts
.
forEach
(
function
generate
(
k
)
{
endpoints
.
forEach
(
endpointName
=>
{
var
endpoint
=
k
.
toLowerCase
();
// store for the user to reference via instance.resource
client
[
endpoint
]
=
new
exports
[
k
](
options
);
// store for the user to reference via instance.resource
client
[
endpoint
Name
.
toLowerCase
()]
=
new
exports
[
endpointName
](
options
);
});
});
client
.
setSubdomain
=
function
(
subdomain
)
{
client
.
setSubdomain
=
subdomain
=>
{
parts
.
forEach
(
function
update
(
k
)
{
endpoints
.
forEach
(
endpointName
=>
{
var
endpoint
=
k
.
toLowerCase
();
client
[
endpointName
.
toLowerCase
()].
setSubdomain
(
subdomain
);
client
[
endpoint
].
setSubdomain
(
subdomain
);
});
});
};
};
...
...
lib/util.js
deleted
100644 → 0
View file @
91559004
package.json
View file @
a8c818eb
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
"description"
:
"Wrapper for the challong api"
,
"description"
:
"Wrapper for the challong api"
,
"author"
:
"Aaron Tiwell <aaron.tidwell@gmail.com>"
,
"author"
:
"Aaron Tiwell <aaron.tidwell@gmail.com>"
,
"main"
:
"./lib/challonge.js"
,
"main"
:
"./lib/challonge.js"
,
"version"
:
"
1.2
.0"
,
"version"
:
"
2.0
.0"
,
"contributors"
:
[
"contributors"
:
[
{
{
"name"
:
"Ricardo Reis"
,
"name"
:
"Ricardo Reis"
,
...
@@ -49,5 +49,5 @@
...
@@ -49,5 +49,5 @@
"integrate"
:
"npm run-script test && npm run-script format && npm run-script lint"
"integrate"
:
"npm run-script test && npm run-script format && npm run-script lint"
},
},
"engine"
:
"node >=
0.1
0.x"
"engine"
:
"node >=
6.
0.x"
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment