Rename Airlock -> API

This commit is contained in:
Ben Sima 2020-11-29 09:57:46 -05:00
parent 93773027fb
commit 43e713f423
7 changed files with 24 additions and 24 deletions

View File

@ -1,15 +1,15 @@
# Haskell Urbit API
[![License MIT](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT)
[![Hackage](https://img.shields.io/hackage/v/urbit-airlock.svg?style=flat)](https://hackage.haskell.org/package/urbit-airlock)
[![builds.sr.ht status](https://builds.sr.ht/~ben/urbit-airlock.svg)](https://builds.sr.ht/~ben/urbit-airlock?)
[![Hackage](https://img.shields.io/hackage/v/urbit-api.svg?style=flat)](https://hackage.haskell.org/package/urbit-api)
[![builds.sr.ht status](https://builds.sr.ht/~ben/urbit-api.svg)](https://builds.sr.ht/~ben/urbit-api?)
This library helps you talk to your Urbit from Haskell, via HTTP.
The "Urbit Airlock" API is a command-query API that lets you hook into apps
running on your Urbit. You can submit commands (called "pokes") and subscribe to
The Urbit API is a command-query API that lets you hook into apps running on
your Urbit. You can submit commands (called "pokes") and subscribe to
responses.
See the `test.hs` file for some example usages.
@ -22,9 +22,9 @@ the API is `/~/channel/...`, where we send messages to the global log (called
responses, we stream messages from a path associated with the app, such as
`/mailbox/~/~zod/mc`. Internally, I believe Urbit calls these `wire`s.
`urbit-airlock` handles most of the path, session, and HTTP request stuff
`urbit-api` handles most of the path, session, and HTTP request stuff
automatically. See the
[haddocks](https://hackage.haskell.org/package/urbit-airlock/docs/Urbit-Airlock.html)
[haddocks](https://hackage.haskell.org/package/urbit-api/docs/Urbit-API.html)
for more details.
This library is built on req, conduit, and aeson, all of which are very stable
@ -38,7 +38,7 @@ import Data.Aeson ((.=))
import qualified Data.Text as Text
import qualified Data.UUID.V4 as UUID
import Urbit.Airlock
import Urbit.API
main :: IO ()
main = do

View File

@ -6,7 +6,7 @@
{-# OPTIONS_GHC -fno-warn-orphans #-}
-- |
-- Module: Urbit.Airlock
-- Module: Urbit.API
-- Copyright: © 2020present Ben Sima
-- License: MIT
--
@ -16,8 +16,8 @@
--
-- === About the Urbit API
--
-- The "Urbit Airlock" API is a command-query API that lets you hook into apps
-- running on your Urbit. You can submit commands and subscribe to responses.
-- The Urbit API is a command-query API that lets you hook into apps running on
-- your Urbit. You can submit commands and subscribe to responses.
--
-- The Urbit vane @eyre@ is responsible for defining the API interface. The HTTP
-- path to the API is @\/~\/channel\/...@, where we send messages to the global
@ -37,7 +37,7 @@
-- This library is built on req, conduit, and aeson, all of which are very
-- stable and usable libraries for working with HTTP requests and web data.
-- Released under the MIT License, same as Urbit.
module Urbit.Airlock
module Urbit.API
( -- * Types
Ship (..),
Session,

View File

@ -1,4 +1,4 @@
{ nixpkgs ? import ./nixpkgs.nix
, compiler ? "ghc884"
}:
nixpkgs.pkgs.haskell.packages.${compiler}.callPackage ./urbit-airlock.nix { }
nixpkgs.pkgs.haskell.packages.${compiler}.callPackage ./urbit-api.nix { }

View File

@ -3,7 +3,7 @@
}:
nixpkgs.mkShell {
name = "urbit-airlock-shell";
name = "urbit-api-shell";
buildInputs = [
nixpkgs.ormolu.bin

View File

@ -15,7 +15,7 @@ import qualified Data.UUID as UUID
import qualified Data.UUID.V4 as UUID
import qualified System.Environment as Env
import qualified System.Exit as Exit
import Urbit.Airlock
import Urbit.API
main :: IO ()
main = do

View File

@ -1,12 +1,12 @@
name: urbit-airlock
version: 0.1.0.0
name: urbit-api
version: 0.2.0.0
synopsis: Talk to Urbit from Haskell
description:
@urbit-airlock@ is a Haskell library that helps you connect to the Urbit
@urbit-api@ is a Haskell library that helps you connect to the Urbit
API.
.
Built on req, conduit, and aeson for stability and simplicity.
homepage: https://github.com/bsima/urbit-airlock
homepage: https://github.com/bsima/haskell-urbit-api
license: BSD3
license-file: LICENSE
author: Ben Sima
@ -20,7 +20,7 @@ extra-source-files: README.md
library
default-language: Haskell2010
exposed-modules:
Urbit.Airlock
Urbit.API
build-depends:
base >= 4.7 && < 5,
aeson,
@ -40,11 +40,11 @@ library
-- default-language: Haskell2010
-- build-depends:
-- base >= 4.7 && < 5,
-- urbit-airlock
-- urbit-api
--
-- Test-Suite test-urbit-airlock
-- Test-Suite test-urbit-api
-- type: exitcode-stdio-1.0
-- main-is: test.hs
-- build-depends:
-- base >= 4.7 && < 5,
-- urbit-airlock
-- urbit-api

View File

@ -2,14 +2,14 @@
, http-client, modern-uri, req, req-conduit, stdenv, text, uuid
}:
mkDerivation {
pname = "urbit-airlock";
pname = "urbit-api";
version = "0.1.0.0";
src = ./.;
libraryHaskellDepends = [
aeson base bytestring conduit conduit-extra http-client modern-uri
req req-conduit text uuid
];
homepage = "https://github.com/bsima/urbit-airlock";
homepage = "https://github.com/bsima/haskell-urbit-api";
description = "Talk to Urbit from Haskell";
license = stdenv.lib.licenses.bsd3;
}