jimmythompson / halboy Goto Github PK
View Code? Open in Web Editor NEWA library for generating, and interacting with, Hypertext Application Language
License: MIT License
A library for generating, and interacting with, Hypertext Application Language
License: MIT License
Since halboy is already capable of expanding templated URIs at navigation time, it would be really nice to be able to do the same at read time. For example:
;; { "_links": { "rel": { "href": "https://example.com{?template}", "templated": true } } }
(hal/get-href resource :rel {:template :params})
; => "https://example.com?template=params"
I'd like to be able to fetch a resource containing embedded resources and navigate based on the links contained in the embedded resource:
{
"_embedded": {
"thing": {
"_links": {
...
"other": "https://example.com/other/thing"
}
}
}
}
(let [discovery-result (navigator/discover address)
thing-resource (hal/get-resource (navigator/resource discovery-result))
other-result (navigator/get (navigator/from thing-resource))]
(println (navigator/resource other-result)))
Not sure what the API for this should look like but it seems being able to continue navigating from an existing resource would be beneficial in other cases as well.
I hereby take issue with halboy.
I'm not sure whether a typo or a requirement but the params.clj file requires expectations
.
Unfortunately, expectations
seems to hook into clojure.test
resulting in a message being output after any such test files are evaluated.
Is it possible to remove the compile time dependency on expectations
to avoid this?
Example output for eastwood
and eftest
runs is below:
> lein eastwood
== Eastwood 0.2.5 Clojure 1.9.0 JVM 1.8.0_152
Directories scanned for source files:
dev src test/shared test/unit test/persistence test/component
...
== Linting ... ==
== Warnings: 1 (not including reflection warnings) Exceptions thrown: 0
Ran 0 tests containing 0 assertions in 0 msecs
0 failures, 0 errors.
Subprocess failed
> lein with-profile component eftest :all
25/25 100% [==================================================] ETA: 00:00
Ran 25 tests in 1.861 seconds
174 assertions, 0 failures, 0 errors.
Ran 0 tests containing 0 assertions in 0 msecs
0 failures, 0 errors.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.