View Source Dealcloud.Data.Cells (dealcloud v0.4.0)

These are cell APIs. These APIs use key-value pairs when communicating with the server. Both Requests and Responses are sent as arrays of [{EntryId: 1, FieldId: 1, Value: "Hello"}].

These APIs are more performant, but may not be the best when working with ETL tools.

Link to this section Summary

Functions

Returns a list of records and all field values for the requested entries for a given entry type

Just like Dealcloud.Data.Cells.create/3, except can handle requests of any size. Creates new entries and Returns a list record field values for the created entries entryId must be negative integer

Just like Dealcloud.Data.Cells.get/3, except can handle requests of any size. Returns a list record field values for the entries and fields requested

Just like Dealcloud.Data.Cells.update/3, except can handle requests of any size. Updates entries and Returns a list record field values for the created entries entryId must be positive integer

Creates new entries and Returns a list record field values for the created entries entryId must be negative integer

Returns a list record field values for the entries and fields requested

Returns a list of all records and all field values for a given entry type

Returns a list of only entry ids for all records of a given entry type

Returns a list of only entry ids for all records of a given entry type

Returns name and entry ids for all records of a given entry type

Returns a list of name and entry ids for entries modified since the provided DateTime

Updates entries and Returns a list record field values for the created entries entryId must be positive integer

Link to this section Types

Specs

filter() :: %Dealcloud.Data.Filter{
  currencyCode: term(),
  fieldId: term(),
  filterOperation: term(),
  value: term(),
  valueTo: term()
}

Specs

modified() :: %Dealcloud.Data.ModifiedQuery{modifiedSince: term()}

Specs

record() :: %Dealcloud.Data.Record{
  currencyCode: term(),
  entryId: term(),
  fieldId: term(),
  ignoreNearDups: term(),
  rowId: term(),
  value: term()
}

Link to this section Functions

Link to this function

all_fields(entryType, entryIds, config)

View Source

Specs

all_fields(binary() | integer(), [integer()], Dealcloud.Auth.t()) :: [
  Dealcloud.Data.Record
]

Returns a list of records and all field values for the requested entries for a given entry type

Examples

Dealcloud.Data.Cells.all_fields(2011, [1,2,3,4], %Dealcloud.Auth{})
Link to this function

batch_create(type, entries, config)

View Source

Specs

batch_create(integer(), [Dealcloud.Data.Record], Dealcloud.Auth.t()) :: map()

Just like Dealcloud.Data.Cells.create/3, except can handle requests of any size. Creates new entries and Returns a list record field values for the created entries entryId must be negative integer

Examples

field1 = %Dealcloud.Data.Record{fieldId: 1, entryId: -1, value: "Hello"}
field2 = %Dealcloud.Data.Record{fieldId: 2, entryId: -1, value: 6}
entries = [field1, field2]
Dealcloud.Data.Cells.create(2011, entries, %Dealcloud.Auth{})
Link to this function

batch_get(entries, params, config)

View Source

Specs

batch_get([Dealcloud.Data.Record], Dealcloud.Data.Query, Dealcloud.Auth.t()) ::
  map()

Just like Dealcloud.Data.Cells.get/3, except can handle requests of any size. Returns a list record field values for the entries and fields requested

Examples

field1 = %Dealcloud.Data.Record{fieldId: 1, entryId: 1}
field2 = %Dealcloud.Data.Record{fieldId: 2, entryId: 1}
entries = [field1, field2]
query = %Dealcloud.Data.Query{wrapIntoArrays: true}
Dealcloud.Data.Cells.batch_get(entries, query, %Dealcloud.Auth{})
Link to this function

batch_update(type, entries, config)

View Source

Specs

batch_update(integer(), [Dealcloud.Data.Record], Dealcloud.Auth.t()) :: map()

Just like Dealcloud.Data.Cells.update/3, except can handle requests of any size. Updates entries and Returns a list record field values for the created entries entryId must be positive integer

Examples

field1 = %Dealcloud.Data.Record{fieldId: 1, entryId: 1, value: "Hello"}
field2 = %Dealcloud.Data.Record{fieldId: 2, entryId: 1, value: 6}
entries = [field1, field2]
Dealcloud.Data.Cells.create(2011, entries, %Dealcloud.Auth{})
Link to this function

create(type, entries, config)

View Source

Specs

create(integer(), [Dealcloud.Data.Record], Dealcloud.Auth) :: any()

Creates new entries and Returns a list record field values for the created entries entryId must be negative integer

Examples

field1 = %Dealcloud.Data.Record{fieldId: 1, entryId: -1, value: "Hello"}
field2 = %Dealcloud.Data.Record{fieldId: 2, entryId: -1, value: 6}
entries = [field1, field2]
Dealcloud.Data.Cells.create(2011, entries, %Dealcloud.Auth{})
Link to this function

get(entries, params, config)

View Source

Specs

get([Dealcloud.Data.Record], Dealcloud.Data.Query, Dealcloud.Auth) :: [
  Dealcloud.Data.Record
]

Returns a list record field values for the entries and fields requested

Examples

field1 = %Dealcloud.Data.Record{fieldId: 1, entryId: 1}
field2 = %Dealcloud.Data.Record{fieldId: 2, entryId: 1}
entries = [field1, field2]
query = %Dealcloud.Data.Query{wrapIntoArrays: true}
Dealcloud.Data.Cells.get(entries, query, %Dealcloud.Auth{})
Link to this function

get_all(entryType, config)

View Source

Specs

get_all(integer(), Dealcloud.Auth.t()) :: [Dealcloud.Data.Record]

Returns a list of all records and all field values for a given entry type

Examples

Dealcloud.Data.Cells.get_all(2011, %Dealcloud.Auth{})
Link to this function

get_filtered(entryType, filters, config)

View Source

Specs

get_filtered(integer(), Dealcloud.Data.Filter, Dealcloud.Auth) :: any()

Returns a list of only entry ids for all records of a given entry type

Examples

filter1 = %Dealcloud.Data.Filter{fieldId: 1, value: "a", filterOperation: 1}
filter2 = %Dealcloud.Data.Filter{fieldId: 2, value: 500, filterOperation: 0}
filters = [filter1, filter2]
Dealcloud.Data.Cells.get_filtered(2011, filters, %Dealcloud.Auth{})
Link to this function

get_ids(entryType, config)

View Source

Specs

get_ids(integer(), Dealcloud.Auth.t()) :: any()

Returns a list of only entry ids for all records of a given entry type

Examples

Dealcloud.Data.Cells.get_ids(2011, %Dealcloud.Auth{})
Link to this function

get_keys(entryType, config)

View Source

Specs

get_keys(integer(), Dealcloud.Auth.t()) :: any()

Returns name and entry ids for all records of a given entry type

Examples

Dealcloud.Data.Cells.get_keys(2011, %Dealcloud.Auth{})
Link to this function

get_modified(entryType, params, config)

View Source

Specs

get_modified(integer(), Dealcloud.Data.ModifiedQuery, Dealcloud.Auth) :: any()

Returns a list of name and entry ids for entries modified since the provided DateTime

Examples

modifiedDate = %Dealcloud.Data.ModifiedQuery{ modifiedSince: "2019-07-15T15:53:00.050Z"}
Dealcloud.Data.Cells.get_modified(2011, modifiedDate,%Dealcloud.Auth{})
Link to this function

update(type, entries, config)

View Source

Specs

update(integer(), [Dealcloud.Data.Record], Dealcloud.Auth) :: any()

Updates entries and Returns a list record field values for the created entries entryId must be positive integer

Examples

field1 = %Dealcloud.Data.Record{fieldId: 1, entryId: 1, value: "Hello"}
field2 = %Dealcloud.Data.Record{fieldId: 2, entryId: 1, value: 6}
entries = [field1, field2]
Dealcloud.Data.Cells.update(2011, entries, %Dealcloud.Auth{})