cl-gists

2023-10-21

Gists API Wrapper for Common Lisp.

Upstream URL

github.com/Symbolics/cl-gists

Author

Rudolph Miller

Maintainer

Steve Nunez

License

msPl, MIT
README

Contributors Forks Stargazers Issues MS-PL License LinkedIn


Logo

Github Gists

Common lisp wrapper for Github's gists API
Explore the docs »

Report Bug · Request Feature · Reference Manual

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Contact

About the Project

An interface for working with gists using the github REST API. The system was originally developed developed by Rudolph Miller in 2015, however as of 2023 it has been abandoned for several years and no longer works with the current Github API. This fork is for maintenance purposes. See the original documentation for more information.

Getting Started

Prerequisites

An ANSI Common Lisp implementation. Developed and tested with SBCL.

Installation

Automated Installation

If you have Quicklisp installed, you can load cl-gists and all of its dependencies with:

(ql:quickload :cl-gists)

Usage

Set the following environment variables to hold your github credentials:

  • GITHUB_USERNAME
  • GITHUB_OAUTH_TOKEN

Github no longer works with a password, so don't bother setting that. If you want a custom scheme for authentication, you can create one by following the examples in examples/1.credentials.lisp

Now to create a gist:

(let ((gist (make-gist :description "sample"
                       :public t
                       :files '((:name "file1" :content "text1") (:name "file2" :content "text2")))))
  (create-gist gist))
;; => #S(GIST ...)

For more examples see the examples/ directory in the source code.

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated. Please see CONTRIBUTING.md for details on the code of conduct, and the process for submitting pull requests.

License

Distributed under the MS-PL License. See LICENSE for more information. The original version is licensed under the MIT license.

Notes

The tests have been updated to work with the latest github API, however there are some things to note:

  • The tests need to authenticate to github using a particular user. Some tests make assumptions about the contents of the users git repository. For example the 'starred' tests checks that we can use the :starred keyword to get-gists, but if the user you're running the tests with doesn't have any starred gists then the test will fail.
  • There are also some inconsistencies in test results depending on whether you repeat the tests. Typically this shows up as "NODE-ID is/is not NIL. On some runs this is returned by github, on others not, so the test results vary.

Contact

Project Link: https://github.com/Symbolics/cl-gists

Dependencies (9)

  • alexandria
  • alexandria-plus
  • babel
  • closer-mop
  • clunit2
  • dexador
  • local-time
  • quri
  • yason

Dependents (1)

  • GitHub
  • Quicklisp