Skip to content

epsanchezma/ride-commons

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RideCommons

Curated set of common modules/functions used across multiple Ride projects in Elixir lang.

Components

RideCommons.HTTP

Based in HTTPoison. Responses are returned as tuples {status_code, headers, body} and errors are raised when bang versions (get!, post!, ...) of functions are used.

  • get(url, headers)
  • get!(url, headers)
  • post(url, body, headers)
  • post!(url, body, headers)
  • put(url, body, headers)
  • put!(url, body, headers)
  • patch(url, body, headers)
  • patch!(url, body, headers)
  • delete(url, headers)
  • delete!(url, headers)

Read HTTPoison documentation for details.

RideCommons.JSON

Based in exjsx. Labels decoded as atoms by default.

  • encode(body, opts)
  • encode!(body, opts)
  • decode(body, opts)
  • decode!(body, opts)

Read exjsx documentation for details about supported options.

RideCommons.UUID

UUIDv4 generation using :crypto.rand_bytes

  • generate_uuid

RideCommons.Naming

Convenient functions for inflecting, copied from Mix.

  • camelize(str)
  • underscore(str)

About

Common modules/functions used across multiple Ride projects

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages