APIMethods/experimental/gadgets.createByXML

TracNav

gadgets.createByXML

Creates a gadget by XML url (OpenSocial gadgets).

params

  • <a href='http://hyves-developers.nl/returnvalues#visibility'>visibility</a> --- The visibility of the gadget.
    • Required
    • Possible values:
      • friend --- visible only to the friends of the user.
      • friends_of_friends --- visible only to the friends of the user and their friends.
      • public --- visible only to all logged in hyvers.
      • superpublic --- visible only to all (whether logged in or not).
      • default --- default visibility, as presented to Hyver on website (note: may involve settings, not a static result).
  • onprofilepage --- Show gadget on profilepage.
    • Optional
    • Default: true
    • Possible values:
      • true --- true
      • false --- false
  • onhomepage --- Show gadget on the homepage.
    • Optional
    • Default: false
    • Possible values:
      • true --- true
      • false --- false

responsefields

This method supports the use of <a href='http://hyves-developers.nl/documentation/data-api/global-ha-parameters'>ha_responsefields</a>. Acceptable values are a comma separated list of 0 or more of the following:

extra

examples

example 1

url

http://data.hyves-api.nl/?oauth_token=YXRfMTc3OTgzNTkxXzmKyqcMfFT5aOazeDxIrRM%3D&specurl=http%3A%2F%2Fwww.apikooien.nl%2Fexamples%2Fopensocial%2Fhelloworld.xml&visibility=superpublic&onprofilepage=true&ha_method=gadgets.createByXML&oauth_consumer_key=Nl-SK2c5ZCBKB_I8hCF_zjPd&oauth_timestamp=1282118228&oauth_nonce=9427_1403&ha_version=experimental&oauth_signature_method=HMAC-SHA1&ha_format=xml&ha_fancylayout=false&oauth_signature=6WMI3D8iPyTMsz5bGwfk16whPNs%3D

result

<?xml version="1.0" encoding="UTF-8"?>
<gadgets_createByXML_result>
        <gadget>
                <gadgetid>1796174da06369f9</gadgetid>
                <title>Hello world example</title>
                <html>&lt;div class=&quot;gadgetsph&quot;&gt;
    &lt;div class=&quot;personal_text gadgetsphheight&quot;&gt;&lt;a class=&quot;personal_link&quot; href=&quot;http://panapi.hyves.nl/gapmember/16217281/Hello_world_example/CmRdk0Df/&quot;&gt;Hello world example&lt;/a&gt;&lt;/div&gt;
    &lt;div&gt;
        &lt;a class=&quot;personal_link&quot; href=&quot;http://panapi.hyves.nl/gapmember/16217281/Hello_world_example/CmRdk0Df/&quot;&gt;&lt;img src=&quot;http://cache.hyves-static.net/images/widgets/opensocial.gif&quot; class=&quot;inlineicon&quot; width=&quot;99&quot; height=&quot;100&quot; alt=&quot;&quot; &gt;&lt;/a&gt;    &lt;/div&gt;
lt;/div&gt;</html>
                <specurl>http://www.apikooien.nl/examples/opensocial/helloworld.xml</specurl>
                <maycopy>true</maycopy>
                <userid>c80dc62fc4bccc64</userid>
                <url>http://panapi.hyves.nl/gapmember/16217281/Hello_world_example/CmRdk0Df/</url>
                <visibility>superpublic</visibility>
        </gadget>
        <info>
                <timestamp_difference>0</timestamp_difference>
                <running_milliseconds>441</running_milliseconds>
                <secure_connection>false</secure_connection>
        </info>
</gadgets_createByXML_result>
example 2

url

http://data.hyves-api.nl/?oauth_token=YXRfMTc3OTgzNTkxXzmKyqcMfFT5aOazeDxIrRM%3D&specurl=http%3A%2F%2Fwww.apikooien.nl%2Fexamples%2Fopensocial%2Fhelloworld.xml&visibility=superpublic&onprofilepage=true&ha_method=gadgets.createByXML&ha_responsefields=commentscount%2Crespectscount%2Cfancylayouttag%2Cviewscount&oauth_consumer_key=Nl-SK2c5ZCBKB_I8hCF_zjPd&oauth_timestamp=1282118228&oauth_nonce=184389_1404&ha_version=experimental&oauth_signature_method=HMAC-SHA1&ha_format=xml&ha_fancylayout=false&oauth_signature=emj4QsD%2BV2UW77vAWkcWkQc%2Bfk8%3D

result

<?xml version="1.0" encoding="UTF-8"?>
<gadgets_createByXML_result>
        <gadget>
                <gadgetid>1796174da06369f9</gadgetid>
                <title>Hello world example</title>
                <html>&lt;div class=&quot;gadgetsph&quot;&gt;
    &lt;div class=&quot;personal_text gadgetsphheight&quot;&gt;&lt;a class=&quot;personal_link&quot; href=&quot;http://panapi.hyves.nl/gapmember/16217281/Hello_world_example/CmRdk0Df/&quot;&gt;Hello world example&lt;/a&gt;&lt;/div&gt;
    &lt;div&gt;
        &lt;a class=&quot;personal_link&quot; href=&quot;http://panapi.hyves.nl/gapmember/16217281/Hello_world_example/CmRdk0Df/&quot;&gt;&lt;img src=&quot;http://cache.hyves-static.net/images/widgets/opensocial.gif&quot; class=&quot;inlineicon&quot; width=&quot;99&quot; height=&quot;100&quot; alt=&quot;&quot; &gt;&lt;/a&gt;    &lt;/div&gt;
lt;/div&gt;</html>
                <specurl>http://www.apikooien.nl/examples/opensocial/helloworld.xml</specurl>
                <maycopy>true</maycopy>
                <userid>c80dc62fc4bccc64</userid>
                <url>http://panapi.hyves.nl/gapmember/16217281/Hello_world_example/CmRdk0Df/</url>
                <visibility>superpublic</visibility>
                <commentscount>0</commentscount>
                <respectscount>0</respectscount>
                <fancylayouttag>[gadget]&lt;div class=&quot;gadgetsph&quot;&gt;
    &lt;div class=&quot;personal_text gadgetsphheight&quot;&gt;&lt;a class=&quot;personal_link&quot; href=&quot;http://panapi.hyves.nl/gapmember/16217281/Hello_world_example/CmRdk0Df/&quot;&gt;Hello world example&lt;/a&gt;&lt;/div&gt;
    &lt;div&gt;
        &lt;a class=&quot;personal_link&quot; href=&quot;http://panapi.hyves.nl/gapmember/16217281/Hello_world_example/CmRdk0Df/&quot;&gt;&lt;img src=&quot;http://cache.hyves-static.net/images/widgets/opensocial.gif&quot; class=&quot;inlineicon&quot; width=&quot;99&quot; height=&quot;100&quot; alt=&quot;&quot; &gt;&lt;/a&gt;    &lt;/div&gt;
lt;/div&gt;[/gadget]</fancylayouttag>
                <viewscount/>
        </gadget>
        <info>
                <timestamp_difference>0</timestamp_difference>
                <running_milliseconds>249</running_milliseconds>
                <secure_connection>false</secure_connection>
        </info>
</gadgets_createByXML_result>

returnvalues

<a href='http://hyves-developers.nl/returnvalues#commentscount'>commentscount</a>, <a href='http://hyves-developers.nl/returnvalues#fancylayouttag'>fancylayouttag</a>, <a href='http://hyves-developers.nl/returnvalues#gadget'>gadget</a>, <a href='http://hyves-developers.nl/returnvalues#gadgetid'>gadgetid</a>, <a href='http://hyves-developers.nl/returnvalues#html'>html</a>, <a href='http://hyves-developers.nl/returnvalues#info'>info</a>, <a href='http://hyves-developers.nl/returnvalues#maycopy'>maycopy</a>, <a href='http://hyves-developers.nl/returnvalues#respectscount'>respectscount</a>, <a href='http://hyves-developers.nl/returnvalues#running_milliseconds'>running_milliseconds</a>, <a href='http://hyves-developers.nl/returnvalues#secure_connection'>secure_connection</a>, <a href='http://hyves-developers.nl/returnvalues#specurl'>specurl</a>, <a href='http://hyves-developers.nl/returnvalues#timestamp_difference'>timestamp_difference</a>, <a href='http://hyves-developers.nl/returnvalues#title'>title</a>, <a href='http://hyves-developers.nl/returnvalues#url'>url</a>, <a href='http://hyves-developers.nl/returnvalues#userid'>userid</a>, <a href='http://hyves-developers.nl/returnvalues#viewscount'>viewscount</a>, <a href='http://hyves-developers.nl/returnvalues#visibility'>visibility</a>