Skip to content

Commit

Permalink
Rename query param to analysisType to fit keen terms, fixing #6
Browse files Browse the repository at this point in the history
  • Loading branch information
gphat committed Feb 5, 2014
1 parent 1420a61 commit 78377ef
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/main/scala/io/keen/client/scala/Client.scala
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class Client(
groupBy: Option[String]= None): Future[Response] =

doQuery(
query = "average",
analysisType = "average",
collection = collection,
targetProperty = Some(targetProperty),
filters = filters,
Expand All @@ -84,7 +84,7 @@ class Client(
groupBy: Option[String]= None): Future[Response] = {

doQuery(
query = "count",
analysisType = "count",
collection = collection,
targetProperty = None,
filters = filters,
Expand Down Expand Up @@ -112,7 +112,7 @@ class Client(
groupBy: Option[String]= None): Future[Response] = {

doQuery(
query = "count",
analysisType = "count",
collection = collection,
targetProperty = Some(targetProperty),
filters = filters,
Expand Down Expand Up @@ -140,7 +140,7 @@ class Client(
groupBy: Option[String]= None): Future[Response] =

doQuery(
query = "maximum",
analysisType = "maximum",
collection = collection,
targetProperty = Some(targetProperty),
filters = filters,
Expand All @@ -167,7 +167,7 @@ class Client(
groupBy: Option[String]= None): Future[Response] =

doQuery(
query = "minimum",
analysisType = "minimum",
collection = collection,
targetProperty = Some(targetProperty),
filters = filters,
Expand All @@ -194,7 +194,7 @@ class Client(
groupBy: Option[String]= None): Future[Response] = {

doQuery(
query = "select_unique",
analysisType = "select_unique",
collection = collection,
targetProperty = Some(targetProperty),
filters = filters,
Expand Down Expand Up @@ -222,7 +222,7 @@ class Client(
groupBy: Option[String]= None): Future[Response] =

doQuery(
query = "sum",
analysisType = "sum",
collection = collection,
targetProperty = Some(targetProperty),
filters = filters,
Expand Down Expand Up @@ -305,15 +305,15 @@ class Client(
}

private def doQuery(
query: String,
analysisType: String,
collection: String,
targetProperty: Option[String],
filters: Option[String] = None,
timeframe: Option[String] = None,
timezone: Option[String] = None,
groupBy: Option[String]= None): Future[Response] = {

val req = (url(apiURL) / version / "projects" / projectId / "queries" / query).secure
val req = (url(apiURL) / version / "projects" / projectId / "queries" / analysisType).secure
.addQueryParameter("event_collection", collection)

val paramNames = List("target_property", "filters", "timeframe", "timezone", "group_by")
Expand Down

0 comments on commit 78377ef

Please sign in to comment.