Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ssnickolay/ebayka
Manage Ebay products via API with Elixir
https://github.com/ssnickolay/ebayka
ebay-api elixir-lang
Last synced: 2 days ago
JSON representation
Manage Ebay products via API with Elixir
- Host: GitHub
- URL: https://github.com/ssnickolay/ebayka
- Owner: ssnickolay
- Created: 2017-09-26T15:54:37.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-09-27T16:32:45.000Z (about 7 years ago)
- Last Synced: 2024-10-29T08:41:28.680Z (10 days ago)
- Topics: ebay-api, elixir-lang
- Language: Elixir
- Size: 21.5 KB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Ebayka
=======[![Build Status](https://travis-ci.org/ssnickolay/ebayka.svg?branch=master)](https://travis-ci.org/ssnickolay/ebayka)
## Overview
Ebayka is a small library which makes it a little easier to use the eBay Trading API with Elixir.
## Getting Started
1. Add this to the `defp deps do` list in your mix.exs file:
```elixir
{:ebayka, "~> 0.2"}
```2. Also in mix.exs, add `:ebayka` and `:xml_builder` (for creating XML requests) to the `:applications` list in `def application`.
3. In config/dev.exs, configure `ebayka`:```elixir
config :ebayka, Ebayka,
sandbox: true,
app_id: "your Ebay app ID",
dev_id: "your Ebay dev ID",
cert_id: "your Ebay cert ID",
auth_token: "your Ebay auth token",
site_id: 0, # Your site id, 0 - USA
level: 995, # API version
gateway: Ebayka.Gateway # gateway for execute requests. By default: Ebayka.Gateway
```4. Prepare Ebay request (full example you can see in [/examples](/examples) directory):
```elixir
defmodule ReviseItemRequest do
import XmlBuilderdefp build(product) do
[
element(:Title, product.title),
element(:Description, product.description),
element(:PrimaryCategory, [ element(:CategoryID, product.category_id) ]),
element(:StartPrice, product.price),
...
element(:Site, "US")
]
end
end
```5. Make the request:
```elixir
Ebayka.Request.make("VerifyAddItem", ReviseItemRequest.build(product))
# .. XML RESPONSE ..
```Check out [/examples](/examples) directory as a quick intro.
## Contributing
If you feel like porting or fixing something, please drop a [pull request](https://github.com/ssnickolay/ebayka/pulls) or [issue tracker](https://github.com/ssnickolay/ebayka/issues) at GitHub! Check out the [CONTRIBUTING.md](CONTRIBUTING.md) for more details.## License
`Ebayka` source code is released under Apache 2 License.
Check [LICENSE](LICENSE) and [NOTICE](NOTICE) files for more details. The project HEAD is https://github.com/ssnickolay/ebayka.