New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new function, getAssetListByParams to WindowsAzure\MediaServices\… #766

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
4 participants
@yokawasa
Member

yokawasa commented Dec 26, 2015

I added the following new function (getAssetListByParams) to WindowsAzure\MediaServices\MediaServicesRestProxy.php. I added this because the user of azure-sdk-for-php strongly needed this in order to give filter/sort/top params in getting asset list.

Please review this and consider to add to master.

/**
* Get asset list by params
*
* @param array of parameters to be added to request URL as query string
* such as $skip, $filter, $top, and so on
*
* @return array of Models\Asset
*/
public function getAssetListByParams($params)
{

    $p = array();
    foreach($params as $k => $v){
        $p[] = $k.'='.$v;
    }
    $paramstr = implode('&', $p);
    $propertyList = $this->_getEntityList("Assets()?" . $paramstr );
    $result       = array();

    foreach ($propertyList as $properties) {
        $result[] = Asset::createFromOptions($properties);
    }

    return $result;
}

[Added - Dec 29, 2015]
Here are sample codes for this function:
https://gist.github.com/yokawasa/2c85cec276e43c68fe71
https://gist.github.com/yokawasa/90a8370a4c51c930a301
https://gist.github.com/yokawasa/4eab95e7ef2dc06594ad

@azurecla

This comment has been minimized.

Show comment
Hide comment
@azurecla

azurecla Dec 26, 2015

Hi @yokawasa, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. I promise there's no faxing. https://cla.azure.com.

TTYL, AZPRBOT;

azurecla commented Dec 26, 2015

Hi @yokawasa, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. I promise there's no faxing. https://cla.azure.com.

TTYL, AZPRBOT;

@azuresdkci

This comment has been minimized.

Show comment
Hide comment
@azuresdkci

azuresdkci Dec 26, 2015

Contributor

Can one of the admins verify this patch?

Contributor

azuresdkci commented Dec 26, 2015

Can one of the admins verify this patch?

@yaqiyang

This comment has been minimized.

Show comment
Hide comment
@yaqiyang

yaqiyang Mar 17, 2016

Member

This name getAssetListByParams() is not consistent with our functions in the SDK. As we move forward, we will consider adding similar functions in Media Services

Member

yaqiyang commented Mar 17, 2016

This name getAssetListByParams() is not consistent with our functions in the SDK. As we move forward, we will consider adding similar functions in Media Services

@yaqiyang yaqiyang closed this Mar 17, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment