Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6835785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:16:27+00:00 2026-05-26T23:16:27+00:00

Been scouring the internet looking for documentation that gives a list of acceptable strings

  • 0

Been scouring the internet looking for documentation that gives a list of acceptable strings for the function setOrderBy.

The youtube API page on google code has a link to a dead page at Zend Framework docs, and the docs that I was able to find here (I would give a direct link but can’t find any way to deep link to specific Zend docs – on the left expand Zend_Gdata -> youTube -> Zend_Gdata_YouTube_VideoQuery), provide no more detail than could be derived from the function name:

setOrderBy( string $value ) : \Zend_Gdata_YouTube_Query
Set the value of the orderby parameter

Parameters
Name    Type    Description
$value  string  
Returns
Type    Description
\Zend_Gdata_YouTube_Query   Provides a fluent interface

The function in the Zend library is defined as follows:

/**
 * @param string $value
 * @return Zend_Gdata_Gbase_ItemQuery Provides a fluent interface
 */
public function setOrderBy($value)
{
    if ($value !== null) {
        $this->_params['orderby'] = $value;
    } else {
        unset($this->_params['orderby']);
    }
    return $this;
}

So not much help there either… several google searches didn’t reveal anything. Is there any reference or documentation that maps specific strings to expected output?

**EDIT***

I found a newer version of the youtube php developer API docs. There is a section below that has more information for setOrderBy(). There is a list of 4 strings it will take, but if you provide the strings UPPER_CASE as shown in this documentation (eg: VIEW_COUNT) the query will not work. An example above the setOrderBy documentation calls the function using a camelCase string, and by brute force I was able to find these 4 working parameters:

'viewCount'
'relevance'
'updated'
'rating'
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:16:28+00:00Added an answer on May 26, 2026 at 11:16 pm

    Using a google Search combining the actual parameters I found that worked (see edits above) with a few API related search terms, I found the resource that maps strings to expected results:

    http://code.google.com/apis/youtube/2.0/reference.html#orderbysp

    In short, the strings this function can take are:

    For a video feed:

    'relevance'
    'published'
    'viewCount'
    'rating'
    

    For a playlist feed:

    'position'
    'commentCount'
    'duration'
    'published'
    'title'
    'viewCount'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been scouring the Internet looking for a Java package/class that will allow
I've been scouring for documentation on the REST adapter that is packaged with ember
I have been scouring the internet for over a week now looking for a
I have been scouring the web for a code sample that shows how to
I have been scouring the internet for a way to do this with no
all. I've been scouring the internet, and I haven't found a conclusive answer to
What is field sequential in 3D? I've been scouring the internet but no luck.
I have been scouring the internet trying to figure this one out. Any ideas
I have been scouring the internet to find out how much memory a java
Iv been scouring the net looking for a simple lookup thesaurus to import into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.