Skip to content

Commit

Permalink
Add novelty option to explore endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
nfolkert-foursquare committed Sep 18, 2011
1 parent 147814d commit 1064325
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/main/scala/org/scalafoursquare/call/Caller.scala
Expand Up @@ -495,9 +495,11 @@ class UserlessApp(caller: Caller) extends App(caller) {

// section = food, drinks, coffee, shops, arts, outdoors
// intent = specials, ?
// novelty = new, old
def exploreVenues(lat: Double, long: Double, llAcc: Option[Double]=None, alt: Option[Double]=None,
altAcc: Option[Double]=None, radius: Option[Int]=None, section: Option[String]=None,
query: Option[String]=None, limit: Option[Int]=None, intent: Option[String]=None) =
query: Option[String]=None, limit: Option[Int]=None, intent: Option[String]=None,
novelty: Option[String]=None) =
new Request[VenueExploreResponse](this, "/venues/explore",
p("ll", lat + "," + long) ++
op("llAcc", llAcc) ++
Expand All @@ -507,7 +509,8 @@ class UserlessApp(caller: Caller) extends App(caller) {
op("section", section) ++
op("query", query) ++
op("limit", limit) ++
op("intent", intent)
op("intent", intent) ++
op("novelty", novelty)
)

// intent = checkin, match, specials
Expand Down
2 changes: 1 addition & 1 deletion src/test/scala/org/scalafoursquare/RequestTest.scala
Expand Up @@ -26,7 +26,7 @@ class RequestTest extends SpecsMatchers {
val vlnk = app.venueLinks("id")

val venexp = app.exploreVenues(10.0, 30.0, Some(1000.0), Some(100.0), Some(50.0), Some(2000), Some("shops"),
Some("search for this venue"), Some(10), Some("specials"))
Some("search for this venue"), Some(10), Some("specials"), Some("new"))
val venexp2 = app.exploreVenues(10.0, 30.0)

val vsearch = app.venueSearch(10.0, 20.0, Some(100.0), Some(50.0), Some(100.0), Some("query for this venue"),
Expand Down

0 comments on commit 1064325

Please sign in to comment.