-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add namespace for merged datasets #223
Conversation
(let [url (make-url "merged-datasets" (str merged-dataset-id ".json"))] | ||
(parse-http :get url :no-cache? no-cache?))) | ||
|
||
(defn ^:export data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey I just have a small issue with the formatting and I think the code that builds dataset-suffix
is a little too complicated.
I think #?@(:cljs [:or {:format "json"}])
is really cool. I didn't know that could be done 😄.
What do you think about:
(defn ^:export data
"Return the data associated with a dataset."
[merged-dataset-id & {:keys [format
raw?
must-revalidate?
accept-header
query-params
data-id]
#?@(:cljs [:or {:format "json"}])}]
(let [dataset-suffix (when format (str data-id "." format))
url (make-url "merged-datasets"
merged-dataset-id
"data"
dataset-suffix)
options {:query-params query-params}]
(parse-http :get url
:http-options options
:raw-response? raw?
:must-revalidate? must-revalidate?
:accept-header accept-header)))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I'm bikeshedding at this point but:
(defn ^:export data
"Return the data associated with a dataset."
[merged-dataset-id & {:keys [format
raw?
must-revalidate?
accept-header
query-params
data-id]
#?@(:cljs [:or {:format "json"}])}]
(let [url (make-url "merged-datasets"
merged-dataset-id
(when format (str "data" data-id "." format)))
options {:query-params query-params}]
(parse-http :get url
:http-options options
:raw-response? raw?
:must-revalidate? must-revalidate?
:accept-header accept-header)))
6d2cc39
to
8cca6b5
Compare
Signed-off-by: Njagi Mwaniki <njagi@urbanslug.com>
No description provided.