Code Monkey home page Code Monkey logo

one-small-thing-be's Introduction

One Small Thing - BE

One Small Thing One Small Thing One-Small-Thing

Prerequisites

Installation

  • Fork & clone this repo
  • Run bundle install to install gem packages
  • Run rails db:{drop,create,migrate,seed} to set up Database
  • Run bundle exec figaro install then add your API keys to the config/application.yml file as:
    • NEWS_API_KEY for the Newsapi.org API
    • congress_api for the Propublica API
    • google_api for the Google Civics API
  • Run rails s and navigate to localhost:3000 to connect to the Endpoints

Testing

  • RSpec
  • Postman
  • To run test suite, run bundle exec rspec from command line

Endpoints

Receive endpoints from POST localhost:3000/graphql

Users

{
  users{
      name
      id
  }
}
mutation {
  createUser(input:{
      name: "Bob"
      email: "[email protected]"
  }) {
      user{
          name
          email
      }
  }
}
mutation {
  userUpdate(input:{
      id: 2,
      name: "Colin"
  }) {
      user{
          name
          email
      }
  }
}
mutation {
  userDelete(input:{
    id: "41"
  }) {
      user{
          name
          email
      }
  }
}

News API

{
    stories (name: "Gun Violence") {
        date
        title
        content
        author
        description
        img
        url
    }
}

Propublica API

{
    representatives (address: "80223") {
        name
        emails
        address
        party
        phones
        office
    }
}

Database

Database Schema

Authors (links to GitHub)

one-small-thing-be's People

Contributors

saihall avatar stirlhoss avatar colinreinhart avatar deming-matt avatar camianderson avatar

Stargazers

 avatar

one-small-thing-be's Issues

Set up database

Set up db tables, models, validations and relationships for:

  • Users
  • Topics
  • UserTopics

Google Civics API

Use the google civics api to get a users representatives based on the user location

Adjust database to FE's specs

Change database topic names to:

  • Environment
  • Reproductive Rights
  • Gun Control
  • Immigration
  • Top Stories (replacing headlines)

For headlines, also change query types to include name changes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.