basbl
Repos
29
Followers
2

Events

Created at 14 hours ago
started
Created at 1 day ago
started
Created at 1 day ago

More last minute changes

Created at 1 month ago

Fix typo

More last minute changes

Created at 1 month ago

Include Enum & Stream example

Created at 1 month ago

Update small examples

Created at 1 month ago

Couple of changes to supervisor example

Created at 1 month ago
Created at 1 month ago

Update section name

Created at 1 month ago

Added GenServer and Supervisor sections

Created at 1 month ago

Update readme

Created at 1 month ago

Bump version to 0.3.0

Updat dependencies

Created at 1 month ago

Refactor CastorEDC.Client.new to accept different authentication values

Make adapter configurable allowing for other clients than Hackney

Use Tesla.Mock adapter in connecton error test

Endpoint is now an option and not an optional argument

Fix issue with mocking requests and the timeout middleware

Prevent unwanted properties from ending up in Client

Add user agent as a configurable option

Remove unused VCR cassettes

Simplify default options

Rename timeout to global_timeout and check for Mock adapter

Created at 1 month ago
closed issue
Refactor `CastorEDC.Client`

There's likely to be more additions in the future that end-users might want to set (timeouts, for example). It could be nice to make that possible through an interface like:

def new(client_id, client_secret, opts \\ [])

Where opts is a keyword list that accepts :endpoint, :user_agent, :connect_timeout, :read_timeout etc.

This would be a breaking change though (unless you add a new/5 like def new(client_id, client_secret, endpoint, opts \\ []) but that starts getting unwieldy, especially as the same opts parameter needs to be made available on access_token()), so I didn't want to go there yet without some discussion.

On that note, another perhaps elegant way to model this is:

def new(credentials, opts \\ [])

# or:

def new(credentials, endpoint, opts \\ [])

Where credentials can be given as %{"client_id" => "...", "client_secret" => "..."} or %{"access_token" => "..."}. Then you could do away with the separate access_token/1 and access_token/2 functions.

Originally posted by @zoni in https://github.com/basbl/ex_castor_edc/pull/18#discussion_r912525245

Created at 1 month ago
delete branch
basbl delete branch client-refactor
Created at 1 month ago
pull request closed
Refactor `CastorEDC.Client`

This closes https://github.com/basbl/ex_castor_edc/issues/19

Todo

  • [x] Update livebook
  • [x] Update references to old way of creating Client
  • [x] Fix test names
Created at 1 month ago

Rename timeout to global_timeout and check for Mock adapter

Created at 1 month ago
pull request closed
Set a recognizeable user-agent header

Instead of passing a generic Hackney user-agent, make requests with a user agent identifying this library and its version.

This matches the same scheme I'm advocating in a similar contribution to the Python API client at reiniervlinschoten/castoredc_api.

Created at 1 month ago
issue comment
Set a recognizeable user-agent header

Absorbed in https://github.com/basbl/ex_castor_edc/pull/20

Created at 1 month ago

Simplify default options

Created at 1 month ago
issue comment
Set a recognizeable user-agent header

@zoni I've updated https://github.com/basbl/ex_castor_edc/pull/20 to include a configurable user agent, adapter and some other stuff. Saves you a rebase when it's merged :smile:

Created at 1 month ago

Prevent unwanted properties from ending up in Client

Add user agent as a configurable option

Remove unused VCR cassettes

Created at 1 month ago

Fix issue with mocking requests and the timeout middleware

Created at 1 month ago

Endpoint is now an option and not an optional argument

Created at 1 month ago

Refactor CastorEDC.Client.new to accept different authentication values

Make adapter configurable allowing for other clients than Hackney

Use Tesla.Mock adapter in connecton error test

Endpoin is now an option and not an optional argument

Created at 1 month ago
started
Created at 1 month ago

Update guild session

Created at 2 months ago