Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here's one recommended way, using the <code>pytumblr</code> external library:</p> <pre><code>import pytumblr client = pytumblr.TumblrRestClient( '&lt;consumer_key&gt;', '&lt;consumer_secret&gt;', '&lt;oauth_token&gt;', '&lt;oauth_secret&gt;', ) # Now that you're established, look at the client.create_video method. client.create_video(**kwargs) </code></pre> <p>For a further look into what params it takes, <a href="https://github.com/tumblr/pytumblr/blob/master/pytumblr/__init__.py#L386" rel="nofollow">see the source</a>, particularly the <code>data</code> value, which is a string of a local path to upload or the <code>embed</code> value, which is the section of HTML code which will load your externally hosted video.</p> <p>For info on what the embed tag should look like, you can see it in the <a href="http://www.tumblr.com/docs/en/api/v2#video-posts" rel="nofollow">response object of the example api</a>:</p> <pre><code>{ "width": 250, "embed_code": "&lt;object width=\"248\" height=\"169\"&gt;&lt;param name=\"movie\" value=\"http:\/\/www.youtube.com\/ v\/4Q1aI7xPo0Y&amp;rel=0&amp;egm=0&amp; showinfo=0&amp;fs=1\"&gt;&lt;\/param&gt;&lt;param name=\"wmode\" value=\"transparent\"&gt;&lt;\/param&gt;&lt;param name=\" allowFullScreen\" value=\"true\"&gt;&lt;\/param&gt;&lt;embed src=\"http:\/\/www.youtube.com\/v\/ 4Q1aI7xPo0Y&amp;rel=0&amp;egm=0&amp;showinfo= 0&amp;fs=1\" type=\"application\/x-shockwave-flash\" width=\"248\" height=\"169\" allowFullScreen=\"true\" wmode=\"transparent\"&gt;&lt;\/embed&gt;&lt;\/object&gt;" </code></pre> <p>}</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload