mirror of
https://codeberg.org/keyoxide/doipjs.git
synced 2024-12-23 06:59:29 -07:00
Improve consistency
This commit is contained in:
parent
358b4bbf8f
commit
5ea67c1e6f
2 changed files with 4 additions and 4 deletions
|
@ -15,10 +15,10 @@ limitations under the License.
|
|||
*/
|
||||
const irc = require('irc-upd')
|
||||
|
||||
module.exports = async (serverHostname, nickQuery, nickLogin) => {
|
||||
module.exports = async (nickQuery, opts) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
try {
|
||||
const client = new irc.Client(serverHostname, nickLogin, {
|
||||
const client = new irc.Client(opts.hostname, opts.nick, {
|
||||
port: 6697,
|
||||
secure: true,
|
||||
channels: [],
|
||||
|
|
|
@ -16,13 +16,13 @@ limitations under the License.
|
|||
const bent = require('bent')
|
||||
const bentReq = bent('GET')
|
||||
|
||||
module.exports = async (tweetId, bearerToken) => {
|
||||
module.exports = async (tweetId, opts) => {
|
||||
return bentReq(
|
||||
`https://api.twitter.com/1.1/statuses/show.json?id=${tweetId}&tweet_mode=extended`,
|
||||
null,
|
||||
{
|
||||
Accept: 'application/json',
|
||||
Authorization: `Bearer ${bearerToken}`,
|
||||
Authorization: `Bearer ${opts.bearerToken}`,
|
||||
}
|
||||
)
|
||||
.then(async (data) => {
|
||||
|
|
Loading…
Reference in a new issue