Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/geeks-solutions/ex_sbapi
Elixir Wrapper Around the ShopBuilder API
https://github.com/geeks-solutions/ex_sbapi
api-rest ecommerce
Last synced: 6 days ago
JSON representation
Elixir Wrapper Around the ShopBuilder API
- Host: GitHub
- URL: https://github.com/geeks-solutions/ex_sbapi
- Owner: Geeks-Solutions
- License: mit
- Created: 2018-01-15T15:23:35.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-30T17:48:07.000Z (almost 6 years ago)
- Last Synced: 2024-03-15T06:04:06.346Z (8 months ago)
- Topics: api-rest, ecommerce
- Language: Elixir
- Homepage:
- Size: 76.2 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# ExSbapi
**TODO: Add description**
## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `ex_sbapi` to your list of dependencies in `mix.exs`:```elixir
def deps do
[
{:ex_sbapi, "~> 0.1.2", hex: :shopbuilder_api}
]
end
```If you want to validate user sessions for apps using the ShopBuilder JS SDK, you have to
initialize the process that handles this verification by adding the following line in your `application.ex` children array:```elixir
supervisor(ExSbapi.Process.SessionSupervisor, [])
```And protect the routes to secure with the following pipeline:
```elixir
pipeline :secure_request do
plug :verify_token
plug ExSbapi.Session
end
```the `:verify_token` plug should take care of verifying the token using your application logic and put the data it contains
in the `conn.assigns[:exsbapi_session_data]` it should also place the token in `conn.assigns[:token]`Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at [https://hexdocs.pm/ex_sbapi](https://hexdocs.pm/ex_sbapi).