Skip to content

mithereal/ex_fmcsa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fmcsa

Hex Docs Hex.pm License Last Updated

Web scraper for fmcsa.dot.gov.

This Tool Was Created To Fetch Public Information Related To Registered Motor Carriers In The United States from the Federal Motor Carrier Safety Administration

Installation

If available in Hex, the package can be installed by adding fmcsa to your list of dependencies in mix.exs:

def deps do
  [
    {:fmcsa, "~> 1.0.0"}
  ]
end

Usage

iex:> {_,response }= Fmcsa.fetch_companies_by_state("AZ")
iex:> {company, url} = List.first(response)

iex:> url |> Fmcsa.fetch_company_profile()

{:ok, %{...}} 

daily sync can be done via:

iex:> Fmcsa.all("SYNC")
{:ok, %{...}}

synced data can be dumped:

iex:> {_,response }= Fmcsa.fetch_companies_by_state("AZ")
iex:> company_response = List.first(response)
iex:> Fmcsa.Company.Server.show_profile(company_response)
{:ok, %{...}}

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/fmcsa.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages