Git Product home page Git Product logo

pokemon-scraper-dc-instructors-new-mod-3's Introduction

Pokemon Scraper

Objectives

  • Set up a SQLite database
  • Scrape and save data into your database
  • Use data to make ruby objects

Overview

In this lab, you will set up your schema, scrape data, insert it into your db and then build out methods to manipulate your data.

For our purposes the Pokemon class is responsible for saving, adding, removing, or changing anything about each Pokémon. Your scraper is not responsible for knowing anything about them.

Note

We have set up your scraper class for you, which you can see in lib/scraper.rb. We have also created a schema_migration.sql file that will run the SQL statement to set up your database in db/pokemon.db. Your only job is to build out the methods to save and find pokemon in the database.

Create Our Pokemon Class

Our Pokemon class can be found in lib/pokemon.rb. This is where you will build your methods. Notice that #initialize requires keyword arguments.

A Note On Inserting Into the Database

When you use SQL to insert into a database you write out the values by hand and insert them into the database. However, when you insert your Pokémon into the database you don't want to insert them into the query via string interpolation because of potential dangerous consequences. Instead, we can do two things:

It is generally recommended to go with parameters. Check out this Stack Overflow question for a good example.

View Objectives: on Learn.co and start learning to code for free.

pokemon-scraper-dc-instructors-new-mod-3's People

Contributors

tsiege avatar maxwellbenton avatar pletcher avatar bhollan avatar morgvanny avatar fislabstest avatar changamanda avatar jjseymour avatar annjohn avatar victhevenot avatar ruchiramani avatar drakeltheryuujin avatar babyshoes avatar ahimmelstoss avatar octosteve avatar sarogers avatar peterbell avatar joshuabamboo avatar irmiller22 avatar howardbdev avatar gj avatar febbraiod avatar fs-lms-test-bot avatar aturkewi avatar

Watchers

Kevin McAlear avatar  avatar  avatar  avatar Belinda Black avatar Bernard Mordan avatar raza jafri avatar  avatar Joe Cardarelli avatar  avatar Sophie DeBenedetto avatar  avatar  avatar Antoin avatar Alex Griffith avatar  avatar Amanda D'Avria avatar  avatar Nicole Kroese  avatar Kaeland Chatman avatar Lisa Jiang avatar Vicki Aubin avatar  avatar  avatar  avatar

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.