Skip to content

Commit

Permalink
fixed README to reflect changes in code
Browse files Browse the repository at this point in the history
  • Loading branch information
danhammer committed Jul 9, 2012
1 parent 20541a3 commit 079a20a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Expand Up @@ -25,31 +25,31 @@ A simple Clojure client for [CartoDB](http://cartodb.com) with OAuth support. It
(:use cartodb.client :as cdb))

;; Query a public table and get JSON results:
(cdb/query "SELECT * FROM table" "user")
(cdb/query "SELECT * FROM table" :account "user")

;; Query a public table using API v1 and get JSON results:
(cdb/query "SELECT * FROM table" "user" :api-version "v1")
(cdb/query "SELECT * FROM table" :account "user" :api-version "v1")

;; Query a public table and get GeoJSON results:
(cdb/query "SELECT * FROM table" "user" :format "geojson")
(cdb/query "SELECT * FROM table" :account "user" :format "geojson")

;; Query a public table and get CSV results:
(cdb/query "SELECT * FROM table" "user" :format "csv")
(cdb/query "SELECT * FROM table" :account "user" :format "csv")

;; Query a public table on your own host:
(cdb/query "SELECT * FROM table" "user" :host "myserver.com")
(cdb/query "SELECT * FROM table" :account "user" :host "myserver.com")

;; Query a private table with OAuth credentials:
(def creds {:key "CARTODB_OAUTH_KEY",
:secret "CARTODB_OAUTH_SECRET",
:user "CARTODB_USER",
:password "CARTODB_PASSWORD"})

(cdb/query "SELECT * FROM private_table" "user" :oauth creds)
(cdb/query "SELECT * FROM private_table" :oauth creds)
```

## License

Copyright (C) 2012

Distributed under the Eclipse Public License, the same as Clojure.
Distributed under the Eclipse Public License, the same as Clojure.

0 comments on commit 079a20a

Please sign in to comment.