Packages

Implementation of the ATProtocol client spec in Elixir.

Current section

4 Versions

Jump to

Compare versions

4 files changed
+20 additions
-4 deletions
  @@ -4,8 +4,7 @@ Implementation of the [ATProtocol](https://atproto.com/docs) client spec in Elix
4 4
5 5 ## Installation
6 6
7 - If [available in Hex](https://hex.pm/docs/publish), the package can be installed
8 - by adding `atproto` to your list of dependencies in `mix.exs`:
7 + The package can be installed by adding `atproto` to your list of dependencies in `mix.exs`:
9 8
10 9 ```elixir
11 10 def deps do
  @@ -36,4 +36,4 @@
36 36 {<<"optional">>,false},
37 37 {<<"repository">>,<<"hexpm">>},
38 38 {<<"requirement">>,<<"~> 0.1.0">>}]]}.
39 - {<<"version">>,<<"0.1.2">>}.
39 + {<<"version">>,<<"0.1.3">>}.
  @@ -42,6 +42,23 @@ defmodule ATProto do
42 42 XRPC.procedure(client, "com.atproto.repo.createRecord", body: body)
43 43 end
44 44
45 + @doc """
46 + Get information about the repo, including the list of collections.
47 + """
48 + def describe_repo(client, repo) do
49 + params = [repo: repo]
50 + XRPC.query(client, "com.atproto.repo.describeRepo", params: params)
51 + end
52 +
53 + @doc """
54 + Get a record.
55 + """
56 + def get_record(client, repo, collection, rkey, params \\ []) do
57 + params = [repo: repo, collection: collection, rkey: rkey] |> Keyword.merge(params)
58 +
59 + XRPC.query(client, "com.atproto.repo.getRecord", params: params)
60 + end
61 +
45 62 @doc """
46 63 List a range of records in a collection.
47 64 """
  @@ -2,7 +2,7 @@ defmodule ATProto.MixProject do
2 2 use Mix.Project
3 3
4 4 @source_url "https://github.com/moomerman/atproto"
5 - @version "0.1.2"
5 + @version "0.1.3"
6 6
7 7 def project do
8 8 [