8000 GitHub - gavinwahl/love: Experimental HATEOAS client · GitHub
[go: up one dir, main page]

Skip to content
gavinwahlPublic

About

Experimental HATEOAS client

Resources

Stars

5 stars

Watchers

1 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Love

Love is an experimental HATEOAS client. Retrieves HTTP(S) resources and follows links found in them. Currently only supports the Link HTTP header.

TODO

  • Support more than HTTP GET
  • Support finding links in hypertext (XML + XPath?). JSON would be nice, but how does hyperlinking work without hypertext?

Goal

Given an api that looks like this:

GET /
<links>
  <link rel="users" href="/users/"/>
  <link rel="items" href="/items/"/>
</links>
GET /users/
<users>
  <user name="alice">
    <link rel="profile" href="/users/alice/"/>
  </user>
</users>
GET /users/alice/
<user>
  <city>Anytown</city>
</user>

One should be able to write something like:

>>> service = Service('http://example.com/')
>>> service.users.find('//[@name="alice"]').profile.get('//city/text()')
'Anytown'

About

Experimental HATEOAS client

Resources

Stars

5 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

0