This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Example of how to get the number of followers for a Medium.com User. | |
* | |
* | |
* Related links: | |
* https://github.com/Medium/medium-api-docs/issues/30#issuecomment-227911763 | |
* https://github.com/Medium/medium-api-docs/issues/73 | |
*/ | |
// LODASH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const _ = require('lodash'); | |
const objection = require('objection'); | |
const Model = objection.Model; | |
const knex = require('knex')({ | |
debug: false, | |
client: 'pg', | |
connection: 'INSERT CONNECTION STRING HERE', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const _ = require('lodash'); | |
const objection = require('objection'); | |
const Model = objection.Model; | |
const knex = require('knex')({ | |
debug: false, | |
client: 'pg', | |
connection: 'INSERT CONNECTION STRING HERE', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const assert = require('assert'); | |
const _ = require('lodash'); | |
const objection = require('objection'); | |
const Model = objection.Model; | |
const knex = require('knex')({ | |
debug: false, | |
client: 'pg', |