Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danlamanna/assembla-lib
A library that provides an easier interface to Assemblas API in Emacs Lisp.
https://github.com/danlamanna/assembla-lib
Last synced: about 2 months ago
JSON representation
A library that provides an easier interface to Assemblas API in Emacs Lisp.
- Host: GitHub
- URL: https://github.com/danlamanna/assembla-lib
- Owner: danlamanna
- Created: 2012-11-13T05:08:29.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2013-02-07T15:53:53.000Z (almost 12 years ago)
- Last Synced: 2023-03-22T14:23:09.548Z (almost 2 years ago)
- Language: Emacs Lisp
- Homepage:
- Size: 172 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
assembla-lib
============A library that provides an easier interface to Assemblas API.
This library is based off Assemblas new API (v1) referenced [here][1]. Right now it returns **raw** responses, in XML or JSON per Assemblas response.
Installation
----
1) Add assembla-lib.el to your load path.(require 'assembla-lib)
Use `M-x customize` to set API Key and API Key Secret
Bugs/Enhancements
----
- Adding oauth2 support?
- Better (or any) error handling for 404 and 522 status code responses
- Better responses to PUT/POST/DELETE requests.Usage
----
; Get all spaces in JSON
(asl/get "spaces" "json" (lambda(response)
(with-current-buffer (get-buffer-create "assembla-test-buffer")
(erase-buffer)
(insert (format "%s" response))))); Create a basic ticket in space `space-id'
(asl/post-or-put (format "spaces/%s/tickets" space-id) "json" "{\"ticket\":{\"summary\":\"Assembla from Emacs?!\"}}" "POST" (lambda))Caching Requests
----
assembla-lib will let you cache requests given you've customized `asl/cache-enabled` to `t`.Using the other custom variables, you can alter where the cache files are stored, and the default duration for cached files.
**Example**
;; This will get the latest list of spaces in JSON, and cache it for 1 day
(asl/get "spaces" "json" 'some-callback nil 86400);; This will use the latest list of spaces from cache if they exist, otherwise it
;; will cache them for an hour.
(asl/get "spaces" "json" 'some-other-callback t 3600)[1]: http://api-doc.assembla.com/