{"id":19604318,"url":"https://github.com/norman-thomas/op_ex","last_synced_at":"2026-06-04T23:31:08.146Z","repository":{"id":75739530,"uuid":"168720412","full_name":"norman-thomas/op_ex","owner":"norman-thomas","description":"Open Publishing API Wrapper in Elixir","archived":false,"fork":false,"pushed_at":"2019-02-12T00:06:56.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-26T15:49:54.613Z","etag":null,"topics":["api-wrapper","elixir"],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/norman-thomas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-01T15:46:04.000Z","updated_at":"2019-02-12T00:06:58.000Z","dependencies_parsed_at":"2023-03-24T23:04:32.481Z","dependency_job_id":null,"html_url":"https://github.com/norman-thomas/op_ex","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/norman-thomas/op_ex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/norman-thomas%2Fop_ex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/norman-thomas%2Fop_ex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/norman-thomas%2Fop_ex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/norman-thomas%2Fop_ex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/norman-thomas","download_url":"https://codeload.github.com/norman-thomas/op_ex/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/norman-thomas%2Fop_ex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33924832,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-04T02:00:06.755Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-wrapper","elixir"],"created_at":"2024-11-11T09:36:20.566Z","updated_at":"2026-06-04T23:31:07.909Z","avatar_url":"https://github.com/norman-thomas.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# op-ex\n\nLight-weight Open Publishing API Wrapper in Elixir\n\n## Installation\n\nIf [available in Hex](https://hex.pm/docs/publish), the package can be installed\nby adding `op_ex` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:op_ex, \"~\u003e 0.1.0\"}\n  ]\nend\n```\n\n## Usage\n\nFirst, obtain an access or bearer token and create a new context via:\n\n```elixir\n\n# using access token\nctx = OpenPublishing.Context.new(access_token: \"1_1R_3\")\n\n# or\n# using bearer / auth token\nctx = OpenPublishing.Context.new(auth_token: \"supersecrettoken\")\n```\n\n### Loading a document\n\n```elixir\n\ndoc = OpenPublishing.Object.Document.load(ctx, 1387, [\":basic\"])\n\nIO.puts \"ID: #{to_string(doc.id)}\"\nIO.puts \"Title:\" \u003c\u003e doc.title\nIO.puts \"Subtitle:\" \u003c\u003e doc.subtitle\n\n```\n\n### Streaming events\n\n```elixir\n\nevent_filters = [OpenPublishing.Event.Request.document_metadata_changed]\nfrom = DateTime.from_iso8601(\"2018-01-01T00:00:00Z\")\nevents = \n  ctx\n  |\u003e OpenPublishing.Event.stream(:list_status, event_filters, from)\n  |\u003e Stream.filter(fn event -\u003e event.app_id == 0 end)\n  |\u003e Stream.map(fn event -\u003e event.reference_id end)\n  |\u003e Enum.take(1000)\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnorman-thomas%2Fop_ex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnorman-thomas%2Fop_ex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnorman-thomas%2Fop_ex/lists"}