goofrider / sniphr

Up in your Chromes, sniffin' yr snips...

Home Page:sniphr.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sniphr

This is the rails application that powers sniphr.com.

API

Retrieving Sniphs

Creating Sniphs

An HTTP purist would say that sniphs should be created by POSTs, and they'd be right, but in the current API, GET is used to accommodate the sniphr chrome extension's Ajax implemenation, which doesn't currently support GETs.

The base URL:

http://sniphr.dev/sniphs/save.json

The API expects an object of this structure:

{
  sniph: {
    url: "http://www.thefoxwebsite.org",
    title: "The fox website",
    content: "Welcome to the fox website."
  }
}

The request should be URL encoded, and will look something like this:

http://sniphr.dev/sniphs/save.json?sniph%5Burl%5D=http%3A%2F%2Fwww.thefoxwebsite.org%2F&sniph%5Btitle%5D=The+fox+website%3A+one+site+with+all+the+answers+about+foxes&sniph%5Bcontent%5D=Welcome+to+the+fox+website

About

Up in your Chromes, sniffin' yr snips...

sniphr.com


Languages

Language:Ruby 44.4%Language:CSS 43.2%Language:JavaScript 11.6%Language:CoffeeScript 0.8%