This file contains hidden or 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
| openapi: 3.0.3 | |
| info: | |
| description: > | |
| Congress.gov shares its application programming interface (API) with the | |
| public to ingest the Congressional data. <a href="sign-up/" | |
| target="_blank">Sign up for an API key</a> from api.data.gov that you can | |
| use to access web services provided by Congress.gov. To learn more, view our | |
| <a href="https://github.com/LibraryOfCongress/api.congress.gov/" | |
| target="_blank">GitHub repository</a>. | |
| title: Congress.gov API |
This file contains hidden or 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
| export function add(a, b) { | |
| return a + b + 2; | |
| } | |
| export function p() { | |
| return Promise.resolve('foo'); | |
| } |
This file contains hidden or 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
| let foo = "bar"; | |
| export foo; |
This file contains hidden or 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
| export default function foo() { | |
| sdk.bar(); | |
| } |
This file contains hidden or 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
| import React from 'react'; | |
| import { hydrate } from 'react-dom'; | |
| import { BrowserRouter as Router } from 'react-router-dom'; | |
| import App from './App'; | |
| hydrate(<Router><App /></Router>, document.getElementById('app')); |
This file contains hidden or 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
| package state | |
| import ( | |
| "crypto/rand" | |
| "encoding/base64" | |
| "encoding/binary" | |
| "time" | |
| ) | |
| const ( |
This file contains hidden or 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
| const { randomBytes } = require('crypto'); | |
| const fetch = require('node-fetch'); | |
| const FormData = require('form-data'); | |
| const { parse } = require('url'); | |
| module.exports = class OAuth2 { | |
| constructor({ | |
| endpoint, | |
| clientID, | |
| clientSecret, |
This file contains hidden or 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
| axios.interceptors.request.use((req) => { | |
| let { token, secret } = req; | |
| if (token) delete req.token; | |
| else token = process.env.TW_TOKEN; | |
| if (secret) delete req.secret; | |
| else secret = process.env.TW_TOKEN_SECRET; | |
| const oauth = { | |
| oauth_consumer_key: process.env.TW_KEY, | |
| oauth_nonce: crypto.randomBytes(20).toString('hex'), |
This file contains hidden or 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
| const { Client } = require('discord.js'); | |
| const Redis = require('ioredis'); | |
| module.exports = new class extends Client { | |
| constructor() { | |
| super({ | |
| // discord.js options | |
| }); | |
| this.redis = new Redis({ |
This file contains hidden or 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
| const gulp = require('gulp'); | |
| const del = require('del'); | |
| const ts = require('gulp-typescript'); | |
| const sourcemaps = require('gulp-sourcemaps'); | |
| const typedoc = require('gulp-typedoc'); | |
| const project = ts.createProject('tsconfig.json'); | |
| gulp.task('default', ['build']); | |
| gulp.task('build', () => { |
NewerOlder