How do you get the value of a "embed"?

Vincent Poirier

I have a link field called lien. When I get it from the API through the Item it belongs to, I receive the following array:

[lien] => Array(
    [0] => Array(
        [embed] => 49935230
        [file] => 129256002
    )
)

I have no problem with the file.

How do you get the URL value?

The Embeds documentation: https://developers.podio.com/doc/embeds

A similar issue exists when getting the value of a category field through the Item object. It's an array of the selected option_id, it doesn't hold the option_text. The workaround is to get the corresponding App object and search for the option_text using the provided option_id.

Andreas Haugstrup Pedersen

The field's values are returned as a collection of embed objects. You can see documentation at: http://podio.github.io/podio-php/fields/#linkembed-field

E.g.:

$item = PodioItem::get_basic(123);
$field_id = 'embed';
$collection = $item->fields[$field_id]->values;

foreach ($collection as $embed) {
  print "Embed id: ".$embed->embed_id;
  print "Embed URL: ".$embed->original_url;
}

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How do you get the selected value of a Spinner?

How do you embed binary data in XML?

How do you embed an iframe into markdown

How do you attach local files to an embed?

how do you get a specific value searched by a value in dataframes?

How Do You Get the Name For A Specific Value In A Powershell Hash Table?

How do you get the X value in KMeans clustering in python?

How do you get value of form using angular javascript?

gdb: how do you get the max value of a std::vector<float>?

How do you get the maximum value from a rust ndarray?

How do you get the value dynamically of a static class' properties?

How do you get struct value on unknown interface{}

How do you get all the value in an object using ramda

How do you get nested key value of a hash in Perl?

How do you get the Value of a property from PropertyInfo?

How do you get the formula from a cell instead of the value?

How do you get post value in .NET Core

How do you get the value from a TVML textField?

How do you get the value of a name (text) in javascript?

How do you use the putExtra() and getExtras() code to get an int value?

(ReactJS) How do you get the input value of an input of type date?

How do you get the value for select-option in React?

How do you get the text value from the DataInspector extension in GoJS?

How do you get a value of two int numbers from an array

How do you get "style:" tag value in a Custom View

How do you get the value from a JavaScript function in Flutter WebView?

How do you get the index of a JSON value in Python?

How do you get the value inside an XML document?

How do you get the numerical value from a string of digits?