Code Monkey home page Code Monkey logo

parse_url_rails5's Introduction

URL Parser API

This API does the following:

  • Stores h1, h2, h3 and link content of a given URL
  • Returns a list of previously stored url & their content
  • URL /parsed_url

  • Method: GET

  • Success Response:

    • Code: 200
      Content: { "id": 1, "url": "http://test.global", "h1_tags": [ "Motion" ], "h2_tags": [], "h3_tags": [ "Success Guaranteed", "Testimonials" ], "links": [ "https://www.facebook.com/limlessons", "https://instagram.com/languageinmotion/", "https://twitter.com/limlessons", ], "created_at": "2017-05-13T21:29:28.876Z", "updated_at": "2017-05-13T21:29:28.876Z" }
  • Sample Call: curl -X GET
    http://localhost:3000/parsed_urls
    -H 'cache-control: no-cache'
    -H 'content-type: application/json'
    -H 'postman-token: 4854c070-5354-a02b-491a-63ccd0233ea6'

  • Method: POST

  • Data Params { "parsed_url": {"url": "http://google.com"} }

  • Success Response:

    • Code: 201 Created
      Content: {"id":4,"url":"http://google.com","h1_tags":[],"h2_tags":[],"h3_tags":[],"links":["http://www.google.com/imghp?hl=en\u0026tab=wi","http://maps.google.com/maps?hl=en\u0026tab=wl","https://play.google.com/?hl=en\u0026tab=w8","http://www.youtube.com/?tab=w1","http://news.google.com/nwshp?hl=en\u0026tab=wn","https://mail.google.com/mail/?tab=wm","https://drive.google.com/?tab=wo","https://www.google.com/intl/en/options/","http://www.google.com/history/optout?hl=en","/preferences?hl=en","https://accounts.google.com/ServiceLogin?hl=en\u0026passive=true\u0026continue=http://www.google.com/","/advanced_search?hl=en\u0026authuser=0","/language_tools?hl=en\u0026authuser=0","/intl/en/ads/","/services/","https://plus.google.com/116899029375914044550","/intl/en/about.html","/intl/en/policies/privacy/","/intl/en/policies/terms/"],"created_at":"2017-05-13T21:59:48.790Z","updated_at":"2017-05-13T21:59:48.790Z"}
  • Sample Call: curl -X POST
    http://localhost:3000/parsed_urls
    -H 'cache-control: no-cache'
    -H 'content-type: application/json'
    -H 'postman-token: 4bb2b296-2064-02d6-12f8-872c659bfca2'
    -d '{ "parsed_url": {"url": "http://google.com"} }'

parse_url_rails5's People

Contributors

mopineyro avatar

Watchers

James Cloos 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.