Sort Vimeo API Showcase by custom order - vimeo

I am using a call
$response = $client->request("/users/$client_id/albums/$showcase_id/videos", array(), 'GET');
so I can add the sorting parameters for instance ?sort=alphabetical&direction=desc but what I need is what Vimeo in the Showcase editor describe as 'custom' but ?sort=custom&direction=desc is not a valid call.
How do I obtain the sorting order from the drag and drop?

The various sort options are defined in the API docs, but I think the keyword you're looking for is manual. From the docs:
manual - Sort the results by their manual order.

Related

Mediawiki parser function/extension to check if a user exists?

Is there a Mediawiki extension or built-in wikitext function that checks if an account with a given name exists?
I'm looking for something like:
{{#ifuserexists: username|wikitext if account exists with that username|wikitext otherwise}}
There doesn't appear to be anything easy to find in that regard (search "mediawiki parser function if user exist" and "mediawiki check if user exists" on Google or Bing for example of how search engines utterly fail to find a relevant extension)
RightFunctions can probably do that.
Found something that works.
Contribution Scores provides a parser function {{#cscore: username}} that produces an activity score if the user in question exists and "Invalid username" if the user doesn't exist.
https://www.mediawiki.org/wiki/Extension:Contribution_Scores
Just a warning: #cscore produces a malformed/corrupted string object that is thoroughly incompatible with standard string processing parser functions (including #ifeq, #sub, #replace), so you can't make a template that implements conditionals based on this. All efforts to parse the output produced unexpected/wrong results or UNIQ-QINUs.
If you merely need to view the created/uncreated status of user accounts via a manually configured dashboard, #cscore is sufficient. However, it doesn't work for any programmatic or automated mechanism in wikitext except if you use a nonstandard or deep wikitext manipulation extension where the standard StringFunctions, ParserFunctions, and RegexFunctions fall flat.

Get Theme and Wordpress version details via API

wordpress gives API for all plugins including change log , version , details, screenshots..etc in http://codex.wordpress.org/WordPress.org_API
For example
https://api.wordpress.org/plugins/info/1.0/BuddyPress
Same way themes and wordpress every version i need to get these details. i have tried with https://api.wordpress.org/themes/info/1.1/
and it shows nothing and i do not know where to modify this api url to get particular details of a theme.
Use the $request parameter to pass the arguments, for example to get infos on Twentyfifteen theme:
https://api.wordpress.org/themes/info/1.1/?action=theme_information&request[slug]=twentyfifteen
Or to get the first 3 themes by the author Wordpress.org:
https://api.wordpress.org/themes/info/1.1/?action=query_themes&request[author]=wordpressdotorg&request[per_page]=3

GAS: Alternative to using ScriptProperties.getProperty which is needed to retrieve events by ID

I am learning GAS. The app script on the Quickstart: Managing Responses for Google Forms uses the depecrated Class&method:ScriptProperties.getProperty(key) ie.ScriptProperties.getProperty('calId'). I have reported this as an issue to Google. Is there a better way to code this example and achieve similar results?
// Store the ID for the Calendar, which is needed to retrieve events by ID.
ScriptProperties.setProperty('calId', cal.getId());
You'll want to use Properties.setProperty(key, value) instead of ScriptProperties.setProperty(key, value) The reason is because The "Properties Service" has now replaced Google's ScriptProperties class. Here's my source: https://developers.google.com/apps-script/guides/properties
The other answer is almost right..., it just uses a shortcut from the documentation without defining the shortcut itself.
The syntax is as follows
PropertiesService.getScriptProperties().setProperty(key, value)
And all the similar methods as described in the documentation. (getProperty,setProperties , etc...)
The usage is the same, you can use find/replace in your script to simply update every occurrences .

Google map supports ArcGISDynamicMapServiceLayer from ESRI API?

i believe that in google API version 2, it could eventually call this method out. Moreover they do share or happen to be using the same type of coding.
However in version 3, i could not set this layer to the map neither via "layer.setMap(map)" because this esri method does not has this function , nor "map.addOverlay(layer)" because this function belongs to version 2 which has been taken down. can i ask what is the method replacing "map.addOverlay(layer)" in version 3. i have try using custom overlay function, but is comes out as a image which doesn't match the result i want.
** take note : ArcGISDynamicMapServiceLayer is to call a time aware data layer from esri
Have a look at these examples:
http://gmaps-utility-gis.googlecode.com/svn/trunk/arcgislink/docs/examples.html

How to get phpinfo() variables from php programmatically?

I am attempting to get a list of dependable(consistent across requests) list of "hidden" constants in PHP(as in, the client-side won't know about it in most cases without hacking).
Some of the things I am interested in is the following:
./configure options.
I would also like the very first System value in phpinfo.
The loaded PHP modules(as shown in the Apache section)
The build date of PHP.
Registered PHP streams
Registered stream socket transports
Registered stream filters
How can I get either just a portion of the phpinfo or get these values as a regular string? Note that it doesn't matter if there if markup included, but I don't want to parse the phpinfo as that just seems really slow and surely there is a better way..
Here you go:
ini_get_all() or get_loaded_extensions() were the closest I could find
php_uname()
apache_get_modules()
phpversion() was the closest I could find
stream_get_wrappers()
stream_get_transports()
stream_get_filters()
See also get_defined_constants() and some more.
As Chacha102 mentioned you can also use output control functions and parse the phpinfo():
ob_start();
phpinfo();
$variable = ob_get_contents();
ob_get_clean();
Due to the use of ob_get_clean() it won't mess up other output buffering levels you may be using.
Most of the stuff available from phpinfo() can be found in constants. Try looking through:
print_r(get_defined_constants());
Or the functions on this page: http://us.php.net/manual/en/ref.info.php. There are tons of functions to get information about specific extensions.
The following functions might be worth looking at:
ini_get() http://us.php.net/manual/en/function.ini-get.php
getenv() http://us.php.net/manual/en/function.getenv.php
get_cfg_var() http://us.php.net/manual/en/function.get-cfg-var.php
Maybe I am late a bit, but basically if you call a shell script problematically to the php.exe
php -i
then you can parse all the information required