diff --git a/.formatter.exs b/.formatter.exs new file mode 100644 index 0000000..4d24c79 --- /dev/null +++ b/.formatter.exs @@ -0,0 +1,4 @@ +[ + import_deps: [:typed_struct], + inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"] +] diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml new file mode 100644 index 0000000..8b64f82 --- /dev/null +++ b/.github/workflows/elixir.yml @@ -0,0 +1,45 @@ +name: analytics-elixir + +on: + push: + branches: + - "*" + tags-ignore: + - "*" + +jobs: + build: + name: Build and test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Setup Elixir + uses: actions/setup-elixir@v1 + with: + elixir-version: "1.12.1" + otp-version: "23.0.4" + experimental-otp: true + + - name: Restore dependencies cache + uses: actions/cache@v2 + with: + path: deps + key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} + restore-keys: ${{ runner.os }}-mix- + + - name: Install dependencies + run: mix deps.get + + - name: Check formatted + run: mix format --check-formatted + + - name: Run tests + env: + MIX_ENV: test + run: mix test + + - name: Run Dialyzer + env: + MIX_ENV: dev + run: mix dialyzer diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..000a611 --- /dev/null +++ b/.tool-versions @@ -0,0 +1,2 @@ +elixir 1.16.0-otp-26 +erlang 26.2.1 diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..9acaaa2 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,111 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project +adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +## [2.0.0] - 2024-04-29 + +### Changed + +- Replaced `HTTPoison` library with `Tesla`. + +### Removed + +- Removed `Agent` strategy in favor of configuration. See `t:Segment.options/0` for configuration + instructions. + +### Added + +- Retry mechanism for Segment API requests. +- Request and response logs through `MetaLogger`. +- Additional options available (see `t:Segment.options/0` for documentation): + - `:disable_meta_logger` + - `:filter_body` + - `:http_adapter` + - `:max_retries` + - `:request_timeout` + - `:retry_base_delay` + - `:retry_jitter_factor` + - `:retry_max_delay` + +## [1.3.1] - 2022-03-17 + +### Changed + +- Update the `miss` library. + +## [1.3.0] - 2022-03-16 + +### Changed + +- Fix the encoding for Decimal, Date and DateTime structs. + +## [1.2.1] - 2022-02-25 + +### Changed + +- Bump Poison to v5.0. + +## [1.2.0] - 2021-06-21 + +### Added + +- Use `MetaLogger.Formatter` for formatting logs and masking sensitive fields. + +## [1.1.0] - 2020-12-23 + +### Added + +- Add `drop_nil_fields` options to filter `null` JSON attributes from the request + body sent to the API endpoint. + +## [1.0.0] - 2020-10-09 + +### Changed + +- Returns tuple with `:ok` or `:error` and a JSON string to enable clients + to handle validation errors. + +## [0.2.2] - 2020-10-08 + +### Added + +- Add version field to `Segment.Analytics.Track`, `Segment.Analytics.Identify`, + `Segment.Analytics.Alias`, `Segment.Analytics.Page`, `Segment.Analytics.Screen` + and `Segment.Analytics.Group`. + +## [0.2.1] - 2020-09-28 + +### Removed + +- Removes unused fields. + +## [0.2.0] - 2020-09-23 + +### Added + +- Allow endpoint and API key to be passed via options to the new public function + `Segment.Analytics.call/2`. + +## [v0.1.1] - 2016-10-13 + +### Added + +- First release. + +[unreleased]: https://github.com/FindHotel/analytics-elixir/compare/2.0.0...master +[2.0.0]: https://github.com/FindHotel/analytics-elixir/compare/1.3.1...2.0.0 +[1.3.1]: https://github.com/FindHotel/analytics-elixir/compare/1.3.0...1.3.1 +[1.3.0]: https://github.com/FindHotel/analytics-elixir/compare/1.2.1...1.3.0 +[1.2.1]: https://github.com/FindHotel/analytics-elixir/compare/1.2.0...1.2.1 +[1.2.0]: https://github.com/FindHotel/analytics-elixir/compare/1.1.0...1.2.0 +[1.1.0]: https://github.com/FindHotel/analytics-elixir/compare/1.0.0...1.1.0 +[1.0.0]: https://github.com/FindHotel/analytics-elixir/compare/0.2.2...1.0.0 +[0.2.2]: https://github.com/FindHotel/analytics-elixir/compare/0.2.1...0.2.2 +[0.2.1]: https://github.com/FindHotel/analytics-elixir/compare/0.2.0...0.2.1 +[0.2.0]: https://github.com/FindHotel/analytics-elixir/compare/v0.1.1...0.2.0 +[v0.1.1]: https://github.com/FindHotel/analytics-elixir/releases/tag/v0.1.1 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..36b2e2f --- /dev/null +++ b/Makefile @@ -0,0 +1,73 @@ +# ------------------------------------------- +# Common variables +# ------------------------------------------- + +VERSION_FILE := mix.exs +VERSION := $(shell sed -En "s/^.*@version \"([0-9]*\\.[0-9]*\\.[0-9]*)\"*/\\1/p" ${VERSION_FILE}) + +BLUE_COLOR := \033[0;34m +DEFAULT_COLOR := \033[0;39m +DIM_COLOR := \033[0;2m +YELLOW_COLOR := \033[0;33m + +# ------------------------------------------- +# Default task +# ------------------------------------------- + +.DEFAULT_GOAL := help + +.PHONY: help +help: ## Print this help + @printf "Segment Analytics Elixir ${VERSION}\n" + @awk -F ':|##' '/^[^\t].+?:.*?##/ { printf "${BLUE_COLOR}%-30s${DEFAULT_COLOR} %s\n", $$1, $$NF }' $(MAKEFILE_LIST) + +# ------------------------------------------- +# Release task +# ------------------------------------------- + +CHANGELOG_FILE := CHANGELOG.md +DATE := $(shell date +"%Y-%m-%d") +MAJOR := $(shell echo "${VERSION}" | cut -d . -f1) +MINOR := $(shell echo "${VERSION}" | cut -d . -f2) +PATCH := $(shell echo "${VERSION}" | cut -d . -f3) +REPO_NAME := analytics-elixir +REPO := https:\/\/round-lake.dustinice.workers.dev:443\/https\/github.com\/FindHotel\/${REPO_NAME}\/compare + +.PHONY: release +release: ## Bump the version and create a new tag + @printf "${BLUE_COLOR}The current version is:${DEFAULT_COLOR} ${VERSION}\n" && \ + read -r -p "Do you want to release a [major|minor|patch]: " TYPE && \ + case "$$TYPE" in \ + "major") \ + MAJOR=$$((${MAJOR}+1)); \ + MINOR="0"; \ + PATCH="0"; \ + NEW_VERSION="$$MAJOR.$$MINOR.$$PATCH" \ + ;; \ + "minor") \ + MINOR=$$((${MINOR}+1)); \ + PATCH="0" && \ + NEW_VERSION="${MAJOR}.$$MINOR.$$PATCH" \ + ;; \ + "patch") \ + PATCH=$$((${PATCH}+1)); \ + NEW_VERSION="${MAJOR}.${MINOR}.$$PATCH" \ + ;; \ + *) \ + printf "\\n${YELLOW_COLOR}Release canceled!\n"; \ + exit 0 \ + ;; \ + esac && \ + printf "${BLUE_COLOR}The new version is:${DEFAULT_COLOR} $$NEW_VERSION\n" && \ + printf "\t${DIM_COLOR}Updating ${VERSION_FILE} version${DEFAULT_COLOR}\n" && \ + perl -p -i -e "s/@version \"${VERSION}\"/@version \"$$NEW_VERSION\"/g" ${VERSION_FILE} && \ + printf "\t${DIM_COLOR}Updating ${CHANGELOG_FILE} version${DEFAULT_COLOR}\n" && \ + perl -p -i -e "s/## \[Unreleased\]/## \[Unreleased\]\\n\\n## \[$$NEW_VERSION\] - ${DATE}/g" ${CHANGELOG_FILE} && \ + perl -p -i -e "s/${REPO}\/${VERSION}...master/${REPO}\/$$NEW_VERSION...master/g" ${CHANGELOG_FILE} && \ + perl -p -i -e "s/...master/...master\\n\[$$NEW_VERSION\]: ${REPO}\/${VERSION}...$$NEW_VERSION/g" ${CHANGELOG_FILE} && \ + printf "\t${DIM_COLOR}Recording changes to the repository${DEFAULT_COLOR}\n" && \ + git add ${VERSION_FILE} ${CHANGELOG_FILE} && \ + git commit -m "Bump to $$NEW_VERSION" > /dev/null && \ + printf "\t${DIM_COLOR}Creating release tag${DEFAULT_COLOR}\n" && \ + git tag -a -m "" $$NEW_VERSION && \ + printf "\n${BLUE_COLOR}If everything's ok, push the changes to updstream!${DEFAULT_COLOR}\n" diff --git a/README.md b/README.md index 2b75eda..6f84f51 100644 --- a/README.md +++ b/README.md @@ -1,57 +1,47 @@ -analytics-elixir -================ +# analytics-elixir ![analytics-elixir](https://github.com/FindHotel/analytics-elixir/workflows/analytics-elixir/badge.svg?branch=master) analytics-elixir is a non-supported third-party client for [Segment](https://segment.com) -## Install +## Installation -Add the following to deps section of your mix.exs: `{:segment, github: "stueccles/analytics-elixir"}` +Add the following to deps section of your mix.exs: -and then `mix deps.get` +```elixir +{:segment, github: "FindHotel/analytics-elixir"} +``` -## Usage +And then run: -Start the Segment agent with your write_key from Segment -``` -Segment.start_link("YOUR_WRITE_KEY") +```sh +mix deps.get ``` -There are then two ways to call the different methods on the API. -A basic way through `Segment.Analytics` or by passing a full Struct -with all the data for the API (allowing Context and Integrations to be set) -## Usage in Phoenix +## Usage -This is how I add to a Phoenix project (may not be your preferred way) +For general usage, first define the `:key` configuration: -1. Add the following to deps section of your mix.exs: `{:segment, github: "stueccles/analytics-elixir"}` - and then `mix deps.get` -2. Add segment to applications list in the Phoenix project mix.exs -ie. -``` -def application do - [mod: {FormAndThread, []}, - applications: [:phoenix, :phoenix_html, :cowboy, :logger, - :phoenix_ecto, :postgrex, :segment]] -end -``` -3. Add a config variable for your write_key (may want to make this environment dependent) -ie. -``` -config :segment, - write_key: "2iFFnRsCfi" -``` -4. Start the segment agent as a child of the application in the application file under -the lib directory. In the children list add: -``` -worker(Segment, [Application.get_env(:segment, :write_key)]) +```elixir +config :segment, key: "your_segment_key" ``` +> For detailed information about configuration, see `t:Segment.options/0`. + +Then call `Segment.Analytics` functions to send analytics. + +There are then two ways to call the functions: + +- By using a collection of parameters +- By using the related struct as a parameter + ### Track -``` + +```elixir Segment.Analytics.track(user_id, event, %{property1: "", property2: ""}) ``` + or the full way using a struct with all the possible options for the track call -``` + +```elixir %Segment.Analytics.Track{ userId: "sdsds", event: "eventname", properties: %{property1: "", property2: ""} @@ -60,11 +50,14 @@ or the full way using a struct with all the possible options for the track call ``` ### Identify -``` + +```elixir Segment.Analytics.identify(user_id, %{trait1: "", trait2: ""}) ``` + or the full way using a struct with all the possible options for the identify call -``` + +```elixir %Segment.Analytics.Identify{ userId: "sdsds", traits: %{trait1: "", trait2: ""} } @@ -72,11 +65,14 @@ or the full way using a struct with all the possible options for the identify ca ``` ### Screen -``` + +```elixir Segment.Analytics.screen(user_id, name) ``` + or the full way using a struct with all the possible options for the screen call -``` + +```elixir %Segment.Analytics.Screen{ userId: "sdsds", name: "dssd" } @@ -84,11 +80,14 @@ or the full way using a struct with all the possible options for the screen call ``` ### Alias -``` + +```elixir Segment.Analytics.alias(user_id, previous_id) ``` + or the full way using a struct with all the possible options for the alias call -``` + +```elixir %Segment.Analytics.Alias{ userId: "sdsds", previousId: "dssd" } @@ -96,11 +95,14 @@ or the full way using a struct with all the possible options for the alias call ``` ### Group -``` + +```elixir Segment.Analytics.group(user_id, group_id) ``` + or the full way using a struct with all the possible options for the group call -``` + +```elixir %Segment.Analytics.Group{ userId: "sdsds", groupId: "dssd" } @@ -108,21 +110,33 @@ or the full way using a struct with all the possible options for the group call ``` ### Page -``` + +```elixir Segment.Analytics.page(user_id, name) ``` + or the full way using a struct with all the possible options for the page call -``` + +```elixir %Segment.Analytics.Page{ userId: "sdsds", name: "dssd" } |> Segment.Analytics.page ``` -## Running tests +## Testing + +Clone the repository and run: -There are not many tests at the moment. But you can run a live test on your segment -account by running. +```sh +mix test ``` -SEGMENT_KEY=yourkey mix test + +## Release + +After merge a new feature/bug you can bump the version and push it to upstream: + +```sh +make release +git push origin master && git push origin --tags ``` diff --git a/config/config.exs b/config/config.exs index 6dfa82f..e714c9e 100644 --- a/config/config.exs +++ b/config/config.exs @@ -1,24 +1,3 @@ -# This file is responsible for configuring your application -# and its dependencies with the aid of the Mix.Config module. -use Mix.Config +import Config -# This configuration is loaded before any dependency and is restricted -# to this project. If another project depends on this project, this -# file won't be loaded nor affect the parent project. For this reason, -# if you want to provide default values for your application for third- -# party users, it should be done in your mix.exs file. - -# Sample configuration: -# -# config :logger, :console, -# level: :info, -# format: "$date $time [$level] $metadata$message\n", -# metadata: [:user_id] - -# It is also possible to import configuration files, relative to this -# directory. For example, you can emulate configuration per environment -# by uncommenting the line below and defining dev.exs, test.exs and such. -# Configuration from the imported file will override the ones defined -# here (which is why it is important to import them last). -# -# import_config "#{Mix.env}.exs" +config :segment, http_adapter: Tesla.Mock, key: "my-amazing-key" diff --git a/doc/.build b/doc/.build deleted file mode 100644 index 422718d..0000000 --- a/doc/.build +++ /dev/null @@ -1,20 +0,0 @@ -/Users/stueccles/Development/elixir/analytics-elixir/doc/dist/app-091c05798a.css -/Users/stueccles/Development/elixir/analytics-elixir/doc/dist/app-574613960f.js -/Users/stueccles/Development/elixir/analytics-elixir/doc/fonts/icomoon.eot -/Users/stueccles/Development/elixir/analytics-elixir/doc/fonts/icomoon.svg -/Users/stueccles/Development/elixir/analytics-elixir/doc/fonts/icomoon.ttf -/Users/stueccles/Development/elixir/analytics-elixir/doc/fonts/icomoon.woff -index.html -api-reference.html -404.html -dist/sidebar_items.js -Segment.html -Segment.Analytics.html -Segment.Analytics.Alias.html -Segment.Analytics.Context.html -Segment.Analytics.Group.html -Segment.Analytics.Http.html -Segment.Analytics.Identify.html -Segment.Analytics.Page.html -Segment.Analytics.Screen.html -Segment.Analytics.Track.html diff --git a/doc/.keep b/doc/.keep new file mode 100644 index 0000000..e69de29 diff --git a/doc/404.html b/doc/404.html deleted file mode 100644 index 16b3ebc..0000000 --- a/doc/404.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - 404 – segment v0.1.1 - - - - - - - - - -
- - - -
-
-
- - -

Page not found

- -

Sorry, but the page you were trying to get to, does not exist. You -may want to try searching this site using the sidebar or using our -API Reference page to find what -you were looking for.

- - -
-
-
-
- - - - diff --git a/doc/Segment.Analytics.Alias.html b/doc/Segment.Analytics.Alias.html deleted file mode 100644 index f2737f9..0000000 --- a/doc/Segment.Analytics.Alias.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - Segment.Analytics.Alias – segment v0.1.1 - - - - - - - - - -
- - - -
-
-
- - -

- segment v0.1.1 - Segment.Analytics.Alias - - -

- - - - - - - - - - - - - -
-
-
-
- - - - diff --git a/doc/Segment.Analytics.Context.html b/doc/Segment.Analytics.Context.html deleted file mode 100644 index 5357dcd..0000000 --- a/doc/Segment.Analytics.Context.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - - Segment.Analytics.Context – segment v0.1.1 - - - - - - - - - -
- - - -
-
-
- - -

- segment v0.1.1 - Segment.Analytics.Context - - -

- - - - -
-

- - - - Summary -

- - - -
-

- Functions -

-
-
- new() -
- -
-
- - -
- -
- - - - - - -
- - - - - -
-

- - - - Functions -

-
- -
- - - - new() - - - -
-
- -
-
-
- -
- - - - update(context) - - - -
-
- -
-
- -
- - - - - - -
-
-
-
- - - - diff --git a/doc/Segment.Analytics.Group.html b/doc/Segment.Analytics.Group.html deleted file mode 100644 index 4d8a07a..0000000 --- a/doc/Segment.Analytics.Group.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - Segment.Analytics.Group – segment v0.1.1 - - - - - - - - - -
- - - -
-
-
- - -

- segment v0.1.1 - Segment.Analytics.Group - - -

- - - - - - - - - - - - - -
-
-
-
- - - - diff --git a/doc/Segment.Analytics.Http.html b/doc/Segment.Analytics.Http.html deleted file mode 100644 index 876ebee..0000000 --- a/doc/Segment.Analytics.Http.html +++ /dev/null @@ -1,1000 +0,0 @@ - - - - - - - - Segment.Analytics.Http – segment v0.1.1 - - - - - - - - - -
- - - -
-
-
- - -

- segment v0.1.1 - Segment.Analytics.Http - - -

- - - - -
-

- - - - Summary -

- -
-

- Types -

-
-
- body() -
- -
-
-
- headers() -
- -
- -
- - - -
-

- Functions -

-
- - -

Issues a DELETE request to the given url

-
- -
-
- - -

Issues a DELETE request to the given url, raising an exception in case of -failure

-
- -
-
- - -

Issues a GET request to the given url

-
- -
-
- - -

Issues a GET request to the given url, raising an exception in case of -failure

-
- -
-
- - -

Issues a HEAD request to the given url

-
- -
-
- - -

Issues a HEAD request to the given url, raising an exception in case of -failure

-
- -
-
- - -

Issues an OPTIONS request to the given url

-
- -
-
- - -

Issues a OPTIONS request to the given url, raising an exception in case of -failure

-
- -
-
- - -

Issues a PATCH request to the given url

-
- -
-
- - -

Issues a PATCH request to the given url, raising an exception in case of -failure

-
- -
-
- - -

Issues a POST request to the given url

-
- -
-
- - -

Issues a POST request to the given url, raising an exception in case of -failure

-
- -
- - -
- - -
-
- - -

Issues a PUT request to the given url

-
- -
-
- - -

Issues a PUT request to the given url, raising an exception in case of -failure

-
- -
-
- - -

Issues an HTTP request with the given method to the given url

-
- -
-
- - -

Issues an HTTP request with the given method to the given url, raising an -exception in case of failure

-
- -
-
-
- start() -
- -

Starts HTTPoison and its dependencies

-
- -
- -
- - - - - - -
- - - -
-

- - - - Types -

-
-
- -
- - - - body() - - - -
- -
body :: binary | {:form, [{atom, any}]} | {:file, binary}
- -
- -
-
- -
-
-
- -
- - - - headers() - - - -
- -
headers ::
-  [{binary, binary}] |
-  %{optional(binary) => binary}
- -
- -
-
- -
-
- -
-
- - - -
-

- - - - Functions -

-
- - - - - -
- - - - delete(url, headers \\ [], options \\ []) - - - -
- -
delete(binary, headers, Keyword.t) ::
-  {:ok, HTTPoison.Response.t | HTTPoison.AsyncResponse.t} |
-  {:error, HTTPoison.Error.t}
- -
- -
-
-

Issues a DELETE request to the given url.

-

Returns {:ok, response} if the request is successful, {:error, reason} -otherwise.

-

See request/5 for more detailed information.

- -
-
-
- - - - - -
- - - - delete!(url, headers \\ [], options \\ []) - - - - - -
-
-

Issues a DELETE request to the given url, raising an exception in case of -failure.

-

If the request does not fail, the response is returned.

-

See request!/5 for more detailed information.

- -
-
-
- - - - - -
- - - - get(url, headers \\ [], options \\ []) - - - -
- -
get(binary, headers, Keyword.t) ::
-  {:ok, HTTPoison.Response.t | HTTPoison.AsyncResponse.t} |
-  {:error, HTTPoison.Error.t}
- -
- -
-
-

Issues a GET request to the given url.

-

Returns {:ok, response} if the request is successful, {:error, reason} -otherwise.

-

See request/5 for more detailed information.

- -
-
-
- - - - - -
- - - - get!(url, headers \\ [], options \\ []) - - - - - -
-
-

Issues a GET request to the given url, raising an exception in case of -failure.

-

If the request does not fail, the response is returned.

-

See request!/5 for more detailed information.

- -
-
-
- - - - - -
- - - - head(url, headers \\ [], options \\ []) - - - -
- -
head(binary, headers, Keyword.t) ::
-  {:ok, HTTPoison.Response.t | HTTPoison.AsyncResponse.t} |
-  {:error, HTTPoison.Error.t}
- -
- -
-
-

Issues a HEAD request to the given url.

-

Returns {:ok, response} if the request is successful, {:error, reason} -otherwise.

-

See request/5 for more detailed information.

- -
-
-
- - - - - -
- - - - head!(url, headers \\ [], options \\ []) - - - - - -
-
-

Issues a HEAD request to the given url, raising an exception in case of -failure.

-

If the request does not fail, the response is returned.

-

See request!/5 for more detailed information.

- -
-
-
- - - - - -
- - - - options(url, headers \\ [], options \\ []) - - - -
- -
options(binary, headers, Keyword.t) ::
-  {:ok, HTTPoison.Response.t | HTTPoison.AsyncResponse.t} |
-  {:error, HTTPoison.Error.t}
- -
- -
-
-

Issues an OPTIONS request to the given url.

-

Returns {:ok, response} if the request is successful, {:error, reason} -otherwise.

-

See request/5 for more detailed information.

- -
-
-
- - - - - -
- - - - options!(url, headers \\ [], options \\ []) - - - -
- -
options!(binary, headers, Keyword.t) ::
-  HTTPoison.Response.t |
-  HTTPoison.AsyncResponse.t
- -
- -
-
-

Issues a OPTIONS request to the given url, raising an exception in case of -failure.

-

If the request does not fail, the response is returned.

-

See request!/5 for more detailed information.

- -
-
-
- - - - - -
- - - - patch(url, body, headers \\ [], options \\ []) - - - -
- -
patch(binary, body, headers, Keyword.t) ::
-  {:ok, HTTPoison.Response.t | HTTPoison.AsyncResponse.t} |
-  {:error, HTTPoison.Error.t}
- -
- -
-
-

Issues a PATCH request to the given url.

-

Returns {:ok, response} if the request is successful, {:error, reason} -otherwise.

-

See request/5 for more detailed information.

- -
-
-
- - - - - -
- - - - patch!(url, body, headers \\ [], options \\ []) - - - - - -
-
-

Issues a PATCH request to the given url, raising an exception in case of -failure.

-

If the request does not fail, the response is returned.

-

See request!/5 for more detailed information.

- -
-
-
- - - - - -
- - - - post(url, body, headers \\ [], options \\ []) - - - -
- -
post(binary, body, headers, Keyword.t) ::
-  {:ok, HTTPoison.Response.t | HTTPoison.AsyncResponse.t} |
-  {:error, HTTPoison.Error.t}
- -
- -
-
-

Issues a POST request to the given url.

-

Returns {:ok, response} if the request is successful, {:error, reason} -otherwise.

-

See request/5 for more detailed information.

- -
-
-
- - - - - -
- - - - post!(url, body, headers \\ [], options \\ []) - - - - - -
-
-

Issues a POST request to the given url, raising an exception in case of -failure.

-

If the request does not fail, the response is returned.

-

See request!/5 for more detailed information.

- -
-
-
- -
- - - - process_options(options) - - - -
-
- -
-
-
- -
- - - - process_request_headers(headers) - - - -
-
- -
-
-
- -
- - - - process_url(url) - - - -
-
- -
-
-
- - - - - -
- - - - put(url, body, headers \\ [], options \\ []) - - - -
- -
put(binary, body, headers, Keyword.t) ::
-  {:ok, HTTPoison.Response.t | HTTPoison.AsyncResponse.t} |
-  {:error, HTTPoison.Error.t}
- -
- -
-
-

Issues a PUT request to the given url.

-

Returns {:ok, response} if the request is successful, {:error, reason} -otherwise.

-

See request/5 for more detailed information.

- -
-
-
- - - - - -
- - - - put!(url, body, headers \\ [], options \\ []) - - - - - -
-
-

Issues a PUT request to the given url, raising an exception in case of -failure.

-

If the request does not fail, the response is returned.

-

See request!/5 for more detailed information.

- -
-
-
- - - - - - - -
- - - - request(method, url, body \\ "", headers \\ [], options \\ []) - - - -
- -
request(atom, binary, body, headers, Keyword.t) ::
-  {:ok, HTTPoison.Response.t | HTTPoison.AsyncResponse.t} |
-  {:error, HTTPoison.Error.t}
- -
- -
-
-

Issues an HTTP request with the given method to the given url.

-

This function is usually used indirectly by get/3, post/4, put/4, etc

-

Args:

-
    -
  • method - HTTP method as an atom (:get, :head, :post, :put, -:delete, etc.) -
  • -
  • url - target url as a binary string or char list -
  • -
  • body - request body. See more below -
  • -
  • headers - HTTP headers as an orddict (e.g., [{"Accept", "application/json"}]) -
  • -
  • options - Keyword list of options -
  • -
-

Body:

-
    -
  • binary, char list or an iolist -
  • -
  • {:form, [{K, V}, ...]} - send a form url encoded -
  • -
  • {:file, "/path/to/file"} - send a file -
  • -
-

Options:

-
    -
  • :timeout - timeout to establish a connection, in milliseconds. Default is 8000 -
  • -
  • :recv_timeout - timeout used when receiving a connection. Default is 5000 -
  • -
  • :stream_to - a PID to stream the response to -
  • -
  • :proxy - a proxy to be used for the request; it can be a regular url -or a {Host, Proxy} tuple -
  • -
  • :proxy_auth - proxy authentication {User, Password} tuple -
  • -
  • :ssl - SSL options supported by the ssl erlang module -
  • -
  • :follow_redirect - a boolean that causes redirects to be followed -
  • -
  • :max_redirect - an integer denoting the maximum number of redirects to follow -
  • -
  • :params - an enumerable consisting of two-item tuples that will be appended to the url as query string parameters -
  • -
-

Timeouts can be an integer or :infinity

-

This function returns {:ok, response} or {:ok, async_response} if the -request is successful, {:error, reason} otherwise.

-

- - Examples -

- -
request(:post, "https://my.website.com", "{\"foo\": 3}", [{"Accept", "application/json"}])
- -
-
-
- - - - - - - -
- - - - request!(method, url, body \\ "", headers \\ [], options \\ []) - - - -
- -
request!(atom, binary, body, headers, Keyword.t) :: HTTPoison.Response.t
- -
- -
-
-

Issues an HTTP request with the given method to the given url, raising an -exception in case of failure.

-

request!/5 works exactly like request/5 but it returns just the -response in case of a successful request, raising an exception in case the -request fails.

- -
-
-
- -
- - - - start() - - - -
-
-

Starts HTTPoison and its dependencies.

- -
-
- -
- - - - - - -
-
-
-
- - - - diff --git a/doc/Segment.Analytics.Identify.html b/doc/Segment.Analytics.Identify.html deleted file mode 100644 index aa080f8..0000000 --- a/doc/Segment.Analytics.Identify.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - Segment.Analytics.Identify – segment v0.1.1 - - - - - - - - - -
- - - -
-
-
- - -

- segment v0.1.1 - Segment.Analytics.Identify - - -

- - - - - - - - - - - - - -
-
-
-
- - - - diff --git a/doc/Segment.Analytics.Page.html b/doc/Segment.Analytics.Page.html deleted file mode 100644 index ff70788..0000000 --- a/doc/Segment.Analytics.Page.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - Segment.Analytics.Page – segment v0.1.1 - - - - - - - - - -
- - - -
-
-
- - -

- segment v0.1.1 - Segment.Analytics.Page - - -

- - - - - - - - - - - - - -
-
-
-
- - - - diff --git a/doc/Segment.Analytics.Screen.html b/doc/Segment.Analytics.Screen.html deleted file mode 100644 index 0d0561f..0000000 --- a/doc/Segment.Analytics.Screen.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - Segment.Analytics.Screen – segment v0.1.1 - - - - - - - - - -
- - - -
-
-
- - -

- segment v0.1.1 - Segment.Analytics.Screen - - -

- - - - - - - - - - - - - -
-
-
-
- - - - diff --git a/doc/Segment.Analytics.Track.html b/doc/Segment.Analytics.Track.html deleted file mode 100644 index abce2fb..0000000 --- a/doc/Segment.Analytics.Track.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - Segment.Analytics.Track – segment v0.1.1 - - - - - - - - - -
- - - -
-
-
- - -

- segment v0.1.1 - Segment.Analytics.Track - - -

- - - - - - - - - - - - - -
-
-
-
- - - - diff --git a/doc/Segment.Analytics.html b/doc/Segment.Analytics.html deleted file mode 100644 index f0e0b04..0000000 --- a/doc/Segment.Analytics.html +++ /dev/null @@ -1,412 +0,0 @@ - - - - - - - - Segment.Analytics – segment v0.1.1 - - - - - - - - - -
- - - -
-
-
- - -

- segment v0.1.1 - Segment.Analytics - - -

- - - - -
-

- - - - Summary -

- - - - - - - - - - -
- - - - - -
-

- - - - Functions -

-
- -
- - - - alias(alias) - - - -
-
- -
-
-
- - - -
- - - - alias(user_id, previous_id, context \\ Context.new()) - - - -
-
- -
-
-
- -
- - - - group(group) - - - -
-
- -
-
-
- - - - - -
- - - - group(user_id, group_id, traits \\ %{}, context \\ Context.new()) - - - -
-
- -
-
-
- -
- - - - identify(identify) - - - -
-
- -
-
-
- - - - - -
- - - - identify(user_id, traits \\ %{}, context \\ Context.new()) - - - -
-
- -
-
-
- -
- - - - page(page) - - - -
-
- -
-
-
- - - - - - - -
- - - - page(user_id, name \\ "", properties \\ %{}, context \\ Context.new()) - - - -
-
- -
-
-
- -
- - - - screen(screen) - - - -
-
- -
-
-
- - - - - - - -
- - - - screen(user_id, name \\ "", properties \\ %{}, context \\ Context.new()) - - - -
-
- -
-
-
- -
- - - - track(track) - - - -
-
- -
-
-
- - - - - -
- - - - track(user_id, event, properties \\ %{}, context \\ Context.new()) - - - -
-
- -
-
- -
- - - - - - -
-
-
-
- - - - diff --git a/doc/Segment.html b/doc/Segment.html deleted file mode 100644 index e7c1808..0000000 --- a/doc/Segment.html +++ /dev/null @@ -1,228 +0,0 @@ - - - - - - - - Segment – segment v0.1.1 - - - - - - - - - -
- - - -
-
-
- - -

- segment v0.1.1 - Segment - - -

- - - - -
-

- - - - Summary -

- -
-

- Types -

-
-
- status() -
- -
- -
- - - -
-

- Functions -

- -
- - -
- -
- - - - - - -
- - - -
-

- - - - Types -

-
-
- -
- - - - status() - - - -
- -
status :: :ok | :error
- -
- -
-
- -
-
- -
-
- - - -
-

- - - - Functions -

-
- -
- - - - start_link(write_key) - - - -
- -
start_link(binary) :: {Segment.status, pid}
- -
- -
-
- -
-
-
- -
- - - - write_key() - - - -
-
- -
-
- -
- - - - - - -
-
-
-
- - - - diff --git a/doc/api-reference.html b/doc/api-reference.html deleted file mode 100644 index a856c25..0000000 --- a/doc/api-reference.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - - API Reference – segment v0.1.1 - - - - - - - - - -
- - - -
-
-
- -

- segment v0.1.1 - API Reference -

- - -
-

Modules

- -
- - - - - - -
-
-
-
- - - - diff --git a/doc/dist/app-091c05798a.css b/doc/dist/app-091c05798a.css deleted file mode 100644 index 18b03fa..0000000 --- a/doc/dist/app-091c05798a.css +++ /dev/null @@ -1 +0,0 @@ -@import url(https://fonts.googleapis.com/css?family=Lato:300,700|Merriweather:300italic,300|Inconsolata:400,700);.hljs,article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}img,legend{border:0}.results ul,.sidebar ul{list-style:none}.night-mode-toggle:focus,.sidebar .sidebar-search .sidebar-searchInput:focus,.sidebar .sidebar-search .sidebar-searchInput:hover,.sidebar-toggle:active,.sidebar-toggle:focus,.sidebar-toggle:hover,a:active,a:hover{outline:0}.hljs-comment{color:#8e908c}.css .hljs-class,.css .hljs-id,.css .hljs-pseudo,.hljs-attribute,.hljs-regexp,.hljs-tag,.hljs-variable,.html .hljs-doctype,.ruby .hljs-constant,.xml .hljs-doctype,.xml .hljs-pi,.xml .hljs-tag .hljs-title{color:#c82829}.hljs-built_in,.hljs-constant,.hljs-literal,.hljs-number,.hljs-params,.hljs-pragma,.hljs-preprocessor{color:#f5871f}.css .hljs-rule .hljs-attribute,.ruby .hljs-class .hljs-title{color:#eab700}.hljs-header,.hljs-inheritance,.hljs-name,.hljs-string,.hljs-value,.ruby .hljs-symbol,.xml .hljs-cdata{color:#718c00}.css .hljs-hexcolor,.hljs-title{color:#3e999f}.coffeescript .hljs-title,.hljs-function,.javascript .hljs-title,.perl .hljs-sub,.python .hljs-decorator,.python .hljs-title,.ruby .hljs-function .hljs-title,.ruby .hljs-title .hljs-keyword{color:#4271ae}.hljs-keyword,.javascript .hljs-function{color:#8959a8}.hljs{overflow-x:auto;background:#fff;color:#4d4d4c;padding:.5em;-webkit-text-size-adjust:none}legend,td,th{padding:0}.coffeescript .javascript,.javascript .xml,.tex .hljs-formula,.xml .css,.xml .hljs-cdata,.xml .javascript,.xml .vbscript{opacity:.5}/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}abbr[title]{border-bottom:1px dotted}b,optgroup,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}.content-outer,body{background-color:#fff}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre,textarea{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}table{border-collapse:collapse;border-spacing:0}@font-face{font-family:icomoon;src:url(../fonts/icomoon.eot?h5z89e);src:url(../fonts/icomoon.eot?#iefixh5z89e) format('embedded-opentype'),url(../fonts/icomoon.ttf?h5z89e) format('truetype'),url(../fonts/icomoon.woff?h5z89e) format('woff'),url(../fonts/icomoon.svg?h5z89e#icomoon) format('svg');font-weight:400;font-style:normal}.icon-elem,[class*=" icon-"],[class^=icon-]{font-family:icomoon;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.sidebar,body{font-family:Lato,sans-serif}.icon-link:before{content:"\e005"}.icon-search:before{content:"\e036"}.icon-cross:before{content:"\e117"}@media screen and (max-width:768px){.icon-menu{font-size:1em}}@media screen and (min-width:769px){.icon-menu{font-size:1.25em}}@media screen and (min-width:1281px){.icon-menu{font-size:1.5em}}.icon-menu:before{content:"\e120"}.icon-angle-right:before{content:"\f105"}.icon-code:before{content:"\f121"}body,html{box-sizing:border-box;height:100%;width:100%}body{margin:0;font-size:16px;line-height:1.6875em}*,:after,:before{box-sizing:inherit}.main{display:-webkit-flex;display:-ms-flexbox;display:-ms-flex;display:flex;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}.sidebar{display:-webkit-flex;display:-ms-flexbox;display:-ms-flex;display:flex;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-box-direction:normal;-moz-box-direction:normal;min-height:0;-webkit-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;flex-direction:column;width:300px;height:100%;position:fixed;top:0;left:0;z-index:4}.content{width:100%;padding-left:300px;overflow-y:auto;-webkit-overflow-scrolling:touch;height:100%;position:relative;z-index:3}@media screen and (max-width:768px){body .content{z-index:0;padding-left:0}body .sidebar{z-index:3;-webkit-transform:translateX(-102%);transform:translateX(-102%);will-change:transform}}body.sidebar-closed .sidebar,body.sidebar-closing .sidebar,body.sidebar-opening .sidebar{z-index:0}body.sidebar-opened .sidebar-toggle,body.sidebar-opening .sidebar-toggle{-webkit-transform:translateX(250px);transform:translateX(250px)}@media screen and (max-width:768px){body.sidebar-opened .sidebar,body.sidebar-opening .sidebar{-webkit-transform:translateX(0);transform:translateX(0)}}body.sidebar-closed .content,body.sidebar-closing .content{padding-left:0}body.sidebar-closed .sidebar-toggle,body.sidebar-closing .sidebar-toggle{-webkit-transform:none;transform:none}body.sidebar-closed .icon-menu{color:#000}.sidebar-toggle i,.sidebar-toggle:hover{color:#e1e1e1}body.sidebar-opening .sidebar-toggle{transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out}body.sidebar-opening .content{padding-left:300px;transition:padding-left .3s ease-in-out}@media screen and (max-width:768px){body.sidebar-opening .content{padding-left:0}body.sidebar-opening .sidebar{transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;z-index:3}}body.sidebar-closing .sidebar-toggle{transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out}body.sidebar-closing .content{transition:padding-left .3s ease-in-out}@media screen and (max-width:768px){body.sidebar-closing .sidebar{z-index:3;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;-webkit-transform:translateX(-102%);transform:translateX(-102%)}}.sidebar a,.sidebar-toggle{transition:color .3s ease-in-out}body.sidebar-closed .sidebar{visibility:hidden}.content-inner{max-width:949px;margin:0 auto;padding:3px 60px}.content-outer{min-height:100%}@media screen and (max-width:768px){.content-inner{padding:27px 20px 27px 40px}}.sidebar-toggle{position:fixed;z-index:99;left:18px;top:8px;background-color:transparent;border:none;padding:0;font-size:16px;will-change:transform;-webkit-transform:translateX(250px);transform:translateX(250px)}@media screen and (max-width:768px){.sidebar-toggle{-webkit-transform:translateX(0);transform:translateX(0);left:5px;top:5px}.sidebar-opened .sidebar-toggle{left:18px;top:5px}}.sidebar{font-size:15px;line-height:18px;background:#373f52;color:#d5dae6;overflow:hidden}.sidebar .gradient{background:linear-gradient(#373f52,rgba(55,63,82,0));height:20px;margin-top:-20px;pointer-events:none;position:relative;top:20px;z-index:100}.sidebar ul li{margin:0;padding:0 10px}.sidebar a{color:#d5dae6;text-decoration:none}.sidebar a:hover{color:#fff}.sidebar .sidebar-projectLink{margin:23px 30px 0}.sidebar .sidebar-projectDetails{display:inline-block;text-align:right;vertical-align:top;margin-top:6px}.sidebar .sidebar-projectImage{display:inline-block;max-width:64px;max-height:64px;margin-left:15px;vertical-align:bottom}.sidebar .sidebar-projectName{font-weight:700;font-size:24px;line-height:30px;color:#fff;margin:0;padding:0;max-width:155px}.sidebar .sidebar-projectVersion{margin:0;padding:0;font-weight:300;font-size:16px;line-height:20px;color:#fff}.sidebar .sidebar-listNav{padding:10px 30px 20px;margin:0}.sidebar .sidebar-listNav li,.sidebar .sidebar-listNav li a{text-transform:uppercase;font-weight:300;font-size:14px}.sidebar .sidebar-listNav li{padding-left:17px;border-left:3px solid transparent;transition:all .3s linear;line-height:27px}.sidebar .sidebar-listNav li.selected,.sidebar .sidebar-listNav li.selected a,.sidebar .sidebar-listNav li:hover,.sidebar .sidebar-listNav li:hover a{border-color:#9768d1;color:#fff}.sidebar .sidebar-search{margin:23px 30px 18px;display:-webkit-flex;display:-ms-flexbox;display:-ms-flex;display:flex}.sidebar .sidebar-search i.icon-search{font-size:14px;color:#d5dae6}.sidebar .sidebar-search .sidebar-searchInput{background-color:transparent;border:none;border-radius:0;border-bottom:1px solid #959595;margin-left:5px;height:20px}.sidebar #full-list{margin:0 0 0 30px;padding:10px 20px 40px;overflow-y:auto;-webkit-overflow-scrolling:touch;-webkit-flex:1 1 .01%;-moz-flex:1 1 .01%;-ms-flex:1 1 .01%;flex:1 1 .01%;-ms-flex-positive:1;-ms-flex-negative:1;-ms-flex-preferred-size:.01%}.sidebar #full-list ul{display:none;margin:9px 15px;padding:0}.sidebar #full-list ul li{font-weight:300;line-height:18px;padding:2px 10px}.sidebar #full-list ul li a.expand:before{content:"+";font-family:monospaced;font-size:15px;float:left;width:13px;margin-left:-13px}.sidebar #full-list ul li.open a.expand:before{content:"−"}.sidebar #full-list ul li ul{display:none;margin:9px 6px}.sidebar #full-list li.open>ul,.sidebar #full-list ul li.open>ul{display:block}.sidebar #full-list ul li ul li{border-left:1px solid #959595;padding:0 10px}.sidebar #full-list ul li ul li.active:before{font-family:icomoon;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\f105";margin-left:-10px;font-size:16px;margin-right:5px}.sidebar #full-list li{padding:0;line-height:27px}.sidebar #full-list li.active{border-left:none}.sidebar #full-list li.active>a,.sidebar #full-list li.clicked>a{color:#fff}.sidebar #full-list li.group{text-transform:uppercase;font-weight:700;font-size:.8em;margin:2em 0 0;line-height:1.8em;color:#ddd}@media screen and (max-height:500px){.sidebar{overflow-y:auto}.sidebar #full-list{overflow:visible}}.content-inner{font-family:Merriweather,serif;font-size:1em;line-height:1.6875em}.content-inner h1,.content-inner h2,.content-inner h3,.content-inner h4,.content-inner h5,.content-inner h6{font-family:Lato,sans-serif;font-weight:700;line-height:1.5em;word-wrap:break-word}.content-inner h1{font-size:2em;margin:1em 0 .5em}.content-inner h1.section-heading{margin:1.5em 0 .5em}.content-inner h1 small{font-weight:300}.content-inner h1 a.view-source{font-size:1.2rem}.content-inner h2{font-size:1.6em;margin:1em 0 .5em;font-weight:700}.content-inner h3{font-size:1.375em;margin:1em 0 .5em;font-weight:700}.content-inner a{color:#000;text-decoration:none;text-shadow:.03em 0 #fff,-.03em 0 #fff,0 .03em #fff,0 -.03em #fff,.06em 0 #fff,-.06em 0 #fff,.09em 0 #fff,-.09em 0 #fff,.12em 0 #fff,-.12em 0 #fff,.15em 0 #fff,-.15em 0 #fff;background-image:linear-gradient(#fff,#fff),linear-gradient(#fff,#fff),linear-gradient(#000,#000);background-size:.05em 1px,.05em 1px,1px 1px;background-repeat:no-repeat,no-repeat,repeat-x;background-position:0 90%,100% 90%,0 90%}.content-inner a:selection{text-shadow:.03em 0 #b4d5fe,-.03em 0 #b4d5fe,0 .03em #b4d5fe,0 -.03em #b4d5fe,.06em 0 #b4d5fe,-.06em 0 #b4d5fe,.09em 0 #b4d5fe,-.09em 0 #b4d5fe,.12em 0 #b4d5fe,-.12em 0 #b4d5fe,.15em 0 #b4d5fe,-.15em 0 #b4d5fe;background:#b4d5fe}.content-inner a:-moz-selection{text-shadow:.03em 0 #b4d5fe,-.03em 0 #b4d5fe,0 .03em #b4d5fe,0 -.03em #b4d5fe,.06em 0 #b4d5fe,-.06em 0 #b4d5fe,.09em 0 #b4d5fe,-.09em 0 #b4d5fe,.12em 0 #b4d5fe,-.12em 0 #b4d5fe,.15em 0 #b4d5fe,-.15em 0 #b4d5fe;background:#b4d5fe}.content-inner a *,.content-inner a :after,.content-inner a :before,.content-inner a:after,.content-inner a:before{text-shadow:none}.content-inner a:visited{color:#000}.content-inner ul li{line-height:1.5em}.content-inner ul li>p{margin:0}.content-inner a.view-source{float:right;color:#959595;background:0 0;border:none;text-shadow:none;transition:color .3s ease-in-out;margin-top:1px}.content-inner a.view-source:hover{color:#373f52}.content-inner .note{color:#959595;margin:0 5px;font-size:14px;font-weight:400}.content-inner blockquote{font-style:italic;margin:.5em 0;padding:.25em 1.5em;border-left:3px solid #e1e1e1;display:inline-block}.content-inner blockquote :first-child{padding-top:0;margin-top:0}.content-inner blockquote :last-child{padding-bottom:0;margin-bottom:0}.content-inner table{margin:2em 0}.content-inner th{text-align:left;font-family:Lato,sans-serif;text-transform:uppercase;font-weight:700;padding-bottom:.5em}.content-inner tr{border-bottom:1px solid #d5dae6;vertical-align:bottom;height:2.5em}.content-inner .summary .summary-row .summary-signature a,.content-inner .summary h2 a{background:0 0;border:none;text-shadow:none}.content-inner td,.content-inner th{padding-left:1em;line-height:2em}.content-inner .section-heading:hover a.hover-link{opacity:1;text-decoration:none}.content-inner .section-heading a.hover-link{transition:opacity .3s ease-in-out;display:inline-block;opacity:0;padding:.3em .6em .6em;line-height:1em;margin-left:-2.7em;background:0 0;border:none;text-shadow:none;font-size:16px;vertical-align:middle}.content-inner .detail h2.section-heading{margin:1.5em 0 .5em .3em}.content-inner .visible-xs{display:none!important}@media screen and (max-width:767px){.content-inner .visible-xs{display:block!important}}.content-inner img{max-width:100%}.content-inner .summary h2{font-weight:700}.content-inner .summary .summary-row .summary-signature{font-family:Inconsolata,Menlo,Courier,monospace;font-weight:700}.content-inner .summary .summary-row .summary-synopsis{font-family:Merriweather,serif;font-style:italic;padding:0 1.2em;margin:0 0 .5em}.content-inner .summary .summary-row .summary-synopsis p{margin:0;padding:0}.content-inner .detail-header{margin:1.5em 0 1em;padding:.5em 1em;background:#f7f7f7;border-left:3px solid #9768d1;font-size:1em;font-family:Inconsolata,Menlo,Courier,monospace;position:relative}.content-inner .detail-header .note{float:right}.content-inner .detail-header .signature{font-size:1rem;font-weight:700}.content-inner .detail-header:hover a.detail-link{opacity:1;text-decoration:none}.content-inner .detail-header a.detail-link{transition:opacity .3s ease-in-out;position:absolute;top:0;left:0;display:block;opacity:0;padding:.6em;line-height:1.5em;margin-left:-2.5em;background:0 0;border:none;text-shadow:none}.content-inner .footer .line,.search-results h1{display:inline-block}.content-inner .specs pre,.content-inner code{font-family:Inconsolata,Menlo,Courier,monospace;font-style:normal;line-height:24px}.content-inner .specs{opacity:.7;padding-bottom:.05em}.content-inner .specs pre{font-size:.9em;margin:0;padding:0}.content-inner .docstring{margin:1.2em 0 2.1em 1.2em}.content-inner .docstring h2,.content-inner .docstring h3,.content-inner .docstring h4,.content-inner .docstring h5{font-weight:700}.content-inner .docstring h2{font-size:1em}.content-inner .docstring h3{font-size:.95em}.content-inner .docstring h4{font-size:.9em}.content-inner .docstring h5{font-size:.85em}.content-inner a.no-underline,.content-inner pre a{color:#9768d1;text-shadow:none;text-decoration:none;background-image:none}.content-inner a.no-underline:active,.content-inner a.no-underline:focus,.content-inner a.no-underline:hover,.content-inner a.no-underline:visited,.content-inner pre a:active,.content-inner pre a:focus,.content-inner pre a:hover,.content-inner pre a:visited{color:#9768d1;text-decoration:none}.content-inner code{font-weight:400;background-color:#f7f9fc;border:1px solid #e1e1e1;vertical-align:baseline;border-radius:2px;padding:0 .5em}.content-inner pre{margin:1.5em 0}.content-inner pre.spec{margin:0}.content-inner pre.spec code{padding:0}.content-inner pre code.hljs{white-space:inherit;padding:.5em 1em;background-color:#f7f9fc}.content-inner .footer{margin:4em auto 1em;text-align:center;font-style:italic;font-size:14px;color:#959595}.content-inner .footer a{color:#959595;text-decoration:none;text-shadow:.03em 0 #fff,-.03em 0 #fff,0 .03em #fff,0 -.03em #fff,.06em 0 #fff,-.06em 0 #fff,.09em 0 #fff,-.09em 0 #fff,.12em 0 #fff,-.12em 0 #fff,.15em 0 #fff,-.15em 0 #fff;background-image:linear-gradient(#fff,#fff),linear-gradient(#fff,#fff),linear-gradient(#959595,#959595);background-size:.05em 1px,.05em 1px,1px 1px;background-repeat:no-repeat,no-repeat,repeat-x;background-position:0 90%,100% 90%,0 90%}.content-inner .footer a:selection{text-shadow:.03em 0 #b4d5fe,-.03em 0 #b4d5fe,0 .03em #b4d5fe,0 -.03em #b4d5fe,.06em 0 #b4d5fe,-.06em 0 #b4d5fe,.09em 0 #b4d5fe,-.09em 0 #b4d5fe,.12em 0 #b4d5fe,-.12em 0 #b4d5fe,.15em 0 #b4d5fe,-.15em 0 #b4d5fe;background:#b4d5fe}.content-inner .footer a:-moz-selection{text-shadow:.03em 0 #b4d5fe,-.03em 0 #b4d5fe,0 .03em #b4d5fe,0 -.03em #b4d5fe,.06em 0 #b4d5fe,-.06em 0 #b4d5fe,.09em 0 #b4d5fe,-.09em 0 #b4d5fe,.12em 0 #b4d5fe,-.12em 0 #b4d5fe,.15em 0 #b4d5fe,-.15em 0 #b4d5fe;background:#b4d5fe}.results .result-id a,.search-results a.close-search{background-image:none;transition:color .3s ease-in-out;text-shadow:none}.content-inner .footer a *,.content-inner .footer a :after,.content-inner .footer a :before,.content-inner .footer a:after,.content-inner .footer a:before{text-shadow:none}.content-inner .footer a:visited{color:#959595}.search-results a.close-search{display:inline-block;float:right}.search-results a.close-search:active,.search-results a.close-search:focus,.search-results a.close-search:visited{color:#000}.search-results a.close-search:hover{color:#9768d1}.results .result-id{font-size:1.2em}.results .result-id a:active,.results .result-id a:focus,.results .result-id a:visited{color:#000}.results .result-id a:hover{color:#9768d1}.results .result-elem em,.results .result-id em{font-style:normal;color:#9768d1}.results ul{margin:0;padding:0}.night-mode-toggle{background:0 0;border:none}.night-mode-toggle:after{font-size:12px;content:'Switch to night mode';text-decoration:underline}body.night-mode{background:#212127}body.night-mode .hljs-comment{color:#969896}body.night-mode .css .hljs-class,body.night-mode .css .hljs-id,body.night-mode .css .hljs-pseudo,body.night-mode .hljs-attribute,body.night-mode .hljs-regexp,body.night-mode .hljs-tag,body.night-mode .hljs-variable,body.night-mode .html .hljs-doctype,body.night-mode .ruby .hljs-constant,body.night-mode .xml .hljs-doctype,body.night-mode .xml .hljs-pi,body.night-mode .xml .hljs-tag .hljs-title{color:#c66}body.night-mode .hljs-built_in,body.night-mode .hljs-constant,body.night-mode .hljs-literal,body.night-mode .hljs-number,body.night-mode .hljs-params,body.night-mode .hljs-pragma,body.night-mode .hljs-preprocessor{color:#de935f}body.night-mode .css .hljs-rule .hljs-attribute,body.night-mode .ruby .hljs-class .hljs-title{color:#f0c674}body.night-mode .hljs-header,body.night-mode .hljs-inheritance,body.night-mode .hljs-name,body.night-mode .hljs-string,body.night-mode .hljs-value,body.night-mode .ruby .hljs-symbol,body.night-mode .xml .hljs-cdata{color:#b5bd68}body.night-mode .css .hljs-hexcolor,body.night-mode .hljs-title{color:#8abeb7}body.night-mode .coffeescript .hljs-title,body.night-mode .hljs-function,body.night-mode .javascript .hljs-title,body.night-mode .perl .hljs-sub,body.night-mode .python .hljs-decorator,body.night-mode .python .hljs-title,body.night-mode .ruby .hljs-function .hljs-title,body.night-mode .ruby .hljs-title .hljs-keyword{color:#81a2be}body.night-mode .hljs-keyword,body.night-mode .javascript .hljs-function{color:#b294bb}body.night-mode .hljs{display:block;overflow-x:auto;background:#1d1f21;color:#c5c8c6;padding:.5em;-webkit-text-size-adjust:none}body.night-mode .coffeescript .javascript,body.night-mode .javascript .xml,body.night-mode .tex .hljs-formula,body.night-mode .xml .css,body.night-mode .xml .hljs-cdata,body.night-mode .xml .javascript,body.night-mode .xml .vbscript{opacity:.5}body.night-mode .content-outer{background:#212127}body.night-mode .night-mode-toggle:after{color:#959595;content:'Switch to day mode';text-decoration:underline}body.night-mode .close-search:active,body.night-mode .close-search:focus,body.night-mode .close-search:visited,body.night-mode .results .result-id a:active,body.night-mode .results .result-id a:focus,body.night-mode .results .result-id a:visited{color:#d2d2d2}body.night-mode .close-search:hover,body.night-mode .results .result-id a:hover{color:#9768d1}body.night-mode .content-inner{color:#b4b4b4}body.night-mode .content-inner h1,body.night-mode .content-inner h2,body.night-mode .content-inner h3,body.night-mode .content-inner h4,body.night-mode .content-inner h5,body.night-mode .content-inner h6{color:#d2d2d2}body.night-mode .content-inner a{color:#d2d2d2;text-decoration:none;text-shadow:none;background-image:none}body.night-mode .content-inner .detail-header{background:#3a4152;color:#d2d2d2}body.night-mode .content-inner code,body.night-mode .content-inner pre code.hljs{background-color:#2c2c31;border:1px solid #38383d}body.night-mode .content-inner .footer{color:#959595}body.night-mode .content-inner .footer .line{display:inline-block}body.night-mode .content-inner .footer a{color:#959595;text-shadow:none;background-image:none;text-decoration:underline}.night-mode .sidebar-toggle i{color:#d5dae6}@media print{#sidebar{display:none}} \ No newline at end of file diff --git a/doc/dist/app-574613960f.js b/doc/dist/app-574613960f.js deleted file mode 100644 index d4322a4..0000000 --- a/doc/dist/app-574613960f.js +++ /dev/null @@ -1,6 +0,0 @@ -!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(typeof e[t]){case"function":break;case"object":e[t]=function(t){var n=t.slice(1),r=e[t[0]];return function(e,t,i){r.apply(this,[e,t,i].concat(n))}}(e[t]);break;default:e[t]=e[e[t]]}return e}([function(e,t,n){"use strict";var r=n(1)["default"],i=n(2),a=r(i),o=n(3),s=r(o),l=n(4),u=n(95),c=n(96);window.$=a["default"],a["default"](function(){s["default"].configure({tabReplace:" ",languages:[]}),c.initialize(),u.initialize(),l.initialize(),s["default"].initHighlighting()})},function(e,t){"use strict";t["default"]=function(e){return e&&e.__esModule?e:{"default":e}},t.__esModule=!0},function(e,t,n){var r,i;!function(t,n){"object"==typeof e&&"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,function(n,a){function o(e){var t="length"in e&&e.length,n=re.type(e);return"function"===n||re.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function s(e,t,n){if(re.isFunction(t))return re.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return re.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(fe.test(t))return re.filter(t,e,n);t=re.filter(t,e)}return re.grep(e,function(e){return V.call(t,e)>=0!==n})}function l(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function u(e){var t=ye[e]={};return re.each(e.match(ve)||[],function(e,n){t[n]=!0}),t}function c(){te.removeEventListener("DOMContentLoaded",c,!1),n.removeEventListener("load",c,!1),re.ready()}function f(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=re.expando+f.uid++}function d(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(Ne,"-$1").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:Ee.test(n)?re.parseJSON(n):n}catch(i){}we.set(e,t,n)}else n=void 0;return n}function p(){return!0}function h(){return!1}function g(){try{return te.activeElement}catch(e){}}function m(e,t){return re.nodeName(e,"table")&&re.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function v(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function y(e){var t=Be.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function b(e,t){for(var n=0,r=e.length;r>n;n++)_e.set(e[n],"globalEval",!t||_e.get(t[n],"globalEval"))}function x(e,t){var n,r,i,a,o,s,l,u;if(1===t.nodeType){if(_e.hasData(e)&&(a=_e.access(e),o=_e.set(t,a),u=a.events)){delete o.handle,o.events={};for(i in u)for(n=0,r=u[i].length;r>n;n++)re.event.add(t,i,u[i][n])}we.hasData(e)&&(s=we.access(e),l=re.extend({},s),we.set(t,l))}}function _(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&re.nodeName(e,t)?re.merge([e],n):n}function w(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Se.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}function E(e,t){var r,i=re(t.createElement(e)).appendTo(t.body),a=n.getDefaultComputedStyle&&(r=n.getDefaultComputedStyle(i[0]))?r.display:re.css(i[0],"display");return i.detach(),a}function N(e){var t=te,n=We[e];return n||(n=E(e,t),"none"!==n&&n||(ze=(ze||re("