mirror of
https://github.com/koodiklinikka/koodiklinikka.fi-api.git
synced 2026-02-12 01:51:51 +00:00
add amount parameter to service method
This commit is contained in:
@@ -8,10 +8,10 @@ module.exports = {
|
||||
/**
|
||||
* Fetch five latest events from GitHub organization
|
||||
*/
|
||||
getEvents: function() {
|
||||
getEvents: function(amount) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
request
|
||||
.get('https://api.github.com/orgs/koodiklinikka/events?per_page=5')
|
||||
.get('https://api.github.com/orgs/koodiklinikka/events?per_page=' + amount)
|
||||
.set('Authorization', 'token ' + config.github.token)
|
||||
.end(function(error, response){
|
||||
if(error) {
|
||||
|
||||
Reference in New Issue
Block a user