Showing
3 changed files
with
14 additions
and
16 deletions
appfunctions.js
deleted
100644 → 0
1 | -function GetGameSchedule(teamID, leagueID, season, eventObj){ | ||
2 | - var request = require("request"); | ||
3 | - var options = { | ||
4 | - method: 'GET', | ||
5 | - url: 'https://v3.football.api-sports.io/fixtures', | ||
6 | - qs: {team: teamID, league: leagueID, season: season}, | ||
7 | - headers: { | ||
8 | - 'x-rapidapi-host': 'v3.football.api-sports.io', | ||
9 | - 'x-rapidapi-key': '526fc70a2e8b315e9a960ac4b4764191' | ||
10 | - } | ||
11 | - }; | ||
12 | - request(options, function (error, response, body) { | ||
13 | - if (error) throw new Error(error); | ||
14 | - console.log(body); | ||
15 | - }); | ||
16 | -} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
file02_sync.txt
0 → 100644
1 | +hello | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
file_write.js
0 → 100644
1 | +var fs = require('fs'); | ||
2 | + | ||
3 | +fs.readFile('getids.js', 'utf-8', function(error, data) { | ||
4 | + console.log('01 readAsync: %s',data); | ||
5 | + if(error){ | ||
6 | + try{ | ||
7 | + fs.writeFileSync('file02_sync.txt', "hello", 'utf-8'); | ||
8 | + console.log('02 WRITE DONE!'); | ||
9 | + }catch(e){ | ||
10 | + console.log(e); | ||
11 | + } | ||
12 | + } | ||
13 | +}); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or login to post a comment