Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marcelog/ex_rfc3966
Elixir Tel URI parser compatible with RFC3966
https://github.com/marcelog/ex_rfc3966
Last synced: about 1 month ago
JSON representation
Elixir Tel URI parser compatible with RFC3966
- Host: GitHub
- URL: https://github.com/marcelog/ex_rfc3966
- Owner: marcelog
- License: apache-2.0
- Created: 2015-07-10T17:13:00.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-01-22T21:15:59.000Z (almost 8 years ago)
- Last Synced: 2024-10-12T04:32:07.361Z (2 months ago)
- Language: Elixir
- Size: 14.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- freaking_awesome_elixir - Elixir - Elixir Tel URI parser compatible with RFC3966. (Text and Numbers)
- fucking-awesome-elixir - ex_rfc3966 - Elixir Tel URI parser compatible with RFC3966. (Text and Numbers)
- awesome-elixir - ex_rfc3966 - Elixir Tel URI parser compatible with RFC3966. (Text and Numbers)
README
[![Build Status](https://travis-ci.org/marcelog/ex_rfc3966.svg)](https://travis-ci.org/marcelog/ex_rfc3966)
RFC3966
=======A Tel URI parser trying to be strictly compatible with [RFC3966](https://tools.ietf.org/html/rfc3966).
This project uses [ex_abnf](https://github.com/marcelog/ex_abnf) with the official [uri grammar](https://github.com/marcelog/ex_rfc3966/blob/master/priv/RFC3966.abnf)
## Example
iex> RFC3966.init # Call this one first to initialize the grammar.
iex> {_matched_tel, _not_matched_input, result} = RFC3966.parse 'tel:+1-201-555-0123;param1;param2=value'
iex> result
%RFC3966.Result{
context: nil,
descriptor: nil,
ext: nil,
global: true,
isub: nil,
local: false,
number: '+1-201-555-0123',
params: %{'param1' => nil, 'param2' => 'value'}
}## Using it with Mix
To use it in your Mix projects, first add it as a dependency:
```elixir
def deps do
[{:ex_rfc3966, "~> 0.2.4"}]
end
```
Then run mix deps.get to install it.## License
The source code is released under Apache 2 License.Check [LICENSE](https://github.com/marcelog/ex_abnf/blob/master/LICENSE) file for more information.