NodePing.Helpers (NodePing Elixir v1.7.1) View Source

Helper functions for the inner workings of of elixir library for the NodePing API

Link to this section Summary

Functions

Add the customerid to a list if it is not nil

Combine a struct from a map

Takes querystrings for a URL and merges them into a single string

Link to this section Functions

Link to this function

add_cust_id(list, customerid)

View Source

Add the customerid to a list if it is not nil

Link to this function

combine_map_struct(struct, map)

View Source

Combine a struct from a map

Link to this function

merge_querystrings(querystrings)

View Source

Takes querystrings for a URL and merges them into a single string

Parameters

  • querystrings - A list of tuples where the first value is an Atom for the key, and the second is the value

Examples

iex> NodePing.Helpers.merge_querystrings([{:hello, "world"}, {:sample, "data"}])
"?hello=world&sample=data"