Coder Social home page Coder Social logo

four04kids's Introduction

Code Climate

Embedding Widget

Installation

Live Demo

Simply drop this line of code on your page:

<script id='kids404-script' src="https://s3.amazonaws.com/404kids/src/embed.js" type="text/javascript"></script>

API

index /api/index

This API returns a list of missing persons in the US.

Optional Parameters
  • missing_state: a 2-digit capitalized state name abbreviation, like WA. Default: nil
  • sex: 'Male' or 'Female'. Default: nil
  • page: The page of API responses you wish to fetch. Use this for pagination. Default: 1.
  • per_page: How many results you would like returned per page. Maximum: 100. Default: 100.

If you would like to use more advanced filters, feel free to file an issue or contribute some code.

Response
{
  "api": [
    {
      "id": 1291,
      "missing_city": "Gaithersburg",
      "missing_state": "MD",
      "missing_county": "Montgomery",
      "missing_country": "US",
      "missing_date": "2013-10-02",
      "age": 15,
      "thumbnail_url": "/photographs/USMDr13047111c1t.jpg",
      "image_url": "/photographs/USMDr13047111c1.jpg",
      "aged_photo_url": null,
      "case_number": "r13047111",
      "org_prefix": "USMD",
      "first_name": "Jacob",
      "last_name": "Harris",
      "middle_name": "",
      "full_name": "Jacob  Harris",
      "missing_url": "http://www.missingkids.com/missingkids/servlet/PubCaseSearchServlet?act=viewPoster&caseNum=r13047111&orgPrefix=USMD",
      "weight": null,
      "height": null,
      "eye_color": null,
      "hair_color": null,
      "race": null,
      "sex": null,
      "circumstance": null,
      "has_aged_photo": null
    }, { ... }, ...
  ]
}

random /api/random

This API call returns a random missing person within 500 miles of the request's location.

Parameters
  • exclude: an id to exclude from your search results. Use this to ensure you don't get the same result twice in a row.
  • limit: mile radius to return geoquery results for. Default: 500.
  • location: use a specific location for request. Defaults to request.ip. Valid formats include an ip address [50.78.167.161] or address [bethesda, md, 421 fairview ave n. seattle]. To specify a latitude/longitude, use the query format location[]=latitude&location[]=longitude.
Response
{
  "kid": {
    "id": 2598,
    "missing_city": "Tacoma",
    "missing_state": "WA",
    "missing_county": "Pierce",
    "missing_country": "US",
    "missing_date": "2000-09-21",
    "age": 29,
    "thumbnail_url": "/photographs/NCMC1152881c1t.jpg",
    "image_url": "/photographs/NCMC1152881c1.jpg",
    "aged_photo_url": "/photographs/NCMC1152881e1.jpg",
    "case_number": "1152881",
    "org_prefix": "NCMC",
    "first_name": "Jennifer",
    "last_name": "Enyart",
    "middle_name": "Mae",
    "full_name": "Jennifer Mae Enyart",
    "missing_url": "http://www.missingkids.com/missingkids/servlet/PubCaseSearchServlet?act=viewPoster&caseNum=1152881&orgPrefix=NCMC",
    "weight":120,
    "height":63,
    "eye_color":"blue",
    "hair_color":"blonde",
    "race":"White",
    "sex":"Female",
    "circumstance":"Jennifer's photo is shown age-progressed to 26 years.  She was last seen on September 21, 2000.  She may have traveled to Florida. Jennifer may use the alias name Rochelle Smith.",
    "has_aged_photo":true
  },
  "meta": {
    "location": {
      "ip": "50.78.167.161",
      "country_code": "US",
      "country_name": "United States",
      "region_code": "WA",
      "region_name": "Washington",
      "city": "Bellevue",
      "zipcode": "",
      "latitude": 47.6104,
      "longitude": -122.2007,
      "metro_code": "819",
      "areacode": "425"
    }
  }
}

N.B.: If you specify a location paramater, the meta.location response will take the following form:

"location":{
   "__type":"Location:http://schemas.microsoft.com/search/local/ws/rest/v1",
   "bbox":[
      47.61845726388513,
      -122.34203041025808,
      47.62618269902648,
      -122.32674911192248
   ],
   "name":"421 Fairview Ave N, Seattle, WA 98109",
   "point":{
      "type":"Point",
      "coordinates":[
         47.6223199814558,
         -122.33438976109028
      ]
   },
   "address":{
      "addressLine":"421 Fairview Ave N",
      "adminDistrict":"WA",
      "adminDistrict2":"King Co.",
      "countryRegion":"United States",
      "formattedAddress":"421 Fairview Ave N, Seattle, WA 98109",
      "locality":"Seattle",
      "postalCode":"98109"
   },
   "confidence":"Medium",
   "entityType":"Address",
   "geocodePoints":[
      {
         "type":"Point",
         "coordinates":[
            47.6223199814558,
            -122.33438976109028
         ],
         "calculationMethod":"InterpolationOffset",
         "usageTypes":[
            "Display"
         ]
      },
      {
         "type":"Point",
         "coordinates":[
            47.6223199814558,
            -122.3343227058649
         ],
         "calculationMethod":"Interpolation",
         "usageTypes":[
            "Route"
         ]
      }
   ],
   "matchCodes":[
      "Ambiguous",
      "Good"
   ]
}

Contributing

All code related to our embedded widget can be found in [/embed](https://github.com/theverything/four04kids/tree/master/embed).

All source code is maintained in coffeescript and automatically compiled and minified to javascript. Run [guard](https://github.com/guard/guard) from the command line while editing the coffeescript source file to automate this process.

Pull requests are always welcome for contributions to our backend or embedded widget!

Credit

four04kids's People

Contributors

hstove avatar theverything avatar toastynerd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

four04kids's Issues

Project / API inactive?

It looks like this project and the API it talks to are no longer active. Could someone involved with it give an update?

'gallery' of existing sites using 404kids

We should have a showcase of websites using 404kids. This would probably go well on the homepage and be more of a motivation for websites to embed us and get exposure for them.

hover tooltip doesn't match styleguide

The current tooltip doesn't look like our design comp. This is dependent on #2 because we need some extra fields to display here. We can still get working on the front-end while someone else works on getting the data.

Current:

screen shot 2013-09-22 at 2 24 44 am

Should be:

screen shot 2013-09-22 at 2 27 31 am

How do I add it into a specific location in my 404 page?

If I place the script at the bottom of my markup your widget appears below my footer, I want it above my footer.

If I place the script where I want your widget to appear, it fails to load, I assume because the script is now inside a div.

If I put the script at the bottom of my code and add a div to my page at the location where I want your widget to appear and give the div an id of kids404, my div is moved/removed to the bottom and the widget appears below my footer.

Is it possible to do what I want to do?

content pages

We need to fill out our static_pages. Ross has done most of the work in a google doc, so we mostly just need to copy/paste these in to their respective pages.

  • About
  • stories
  • donate
  • documentation

Navigation bar doesn't have the correct 'active' state

The current navigation bar defaults to highlighting 'about' as active. This is accurate for now, but as we develop different pages, we need the ability to change the active navigation tab. Toggling the .active class will create this effect.

Current:

screen shot 2013-09-22 at 2 28 42 am

github social icon

We should add a github social icon to our links so we can link to this repository. This probably means we should ask Carolyn to create some assets to put there.

screen shot 2013-09-22 at 2 28 42 am

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.