Does VK API support a search by file type? - vk

Say I browse to a vk community and would like to be able to retrieve all of the gifs uploaded to that community, How would I go about this?

You can use method docs.get
Access it by link
https://api.vk.com/method/docs.get.xml?owner_id=-GROUP_ID&access_token=YOUR_ACCESS_TOKEN
Read this my answer to know a bit more if you do not have an acess_token
In result you will see a document with xml-format. (if you want to use json-response-format just remove ".xml" from link you're accessing)
Document will contatin all doc-count and information about each of them like document_id, its title and size, extension and url.
Note that if you accessnig documents from community (not from user) your owner_id in the link must be negative, it must contain - before community_id
To know community id you can read another my post
Feel free to ask any questions if you didn't understand anything :)

Related

How to get posts orderby comment_count ascending and where to place the code? (Wordpress REST API)

I am a complete beginner when it comes to extending Wordpress REST API. I need to extend the API so that a request to /wp-json/wp/v2/posts?orderby=comment_count&order=asc would yield a response with posts that are ordered by comment count in ascending order ie. posts with the least amount of comments appear first.
I skimmed through the REST API Handbook and watched a couple of YouTube videos, but found no answer to my problem. I found this answer and it looks promising, however I'm not entirely sure if the code provided there fits my needs. From what I could gather WP_Query class is what I'm looking for, but I don't know how to make use of it. My second problem is that I don't know where exactly to place any code I may have stumbled upon ie. which file is supposed to play host to the code eventually?
I would greatly appreciate detailed answers and possibly sources for more information regarding this topic.
According to WordPress documentation orderby only accept following parameters:
author, date, id, include, modified, parent, relevance, slug, include_slugs, title
But you can add custom parameters to orderby if you have access to Wordpress website code. Please follow the below URL:
https://www.timrosswebdevelopment.com/wordpress-rest-api-post-order/
Let me know if you need more help.

How can I find all public comments for a Github user?

Until recently I was able to find all my public comments using a link on my profile page. I was using this functionality to keep track of all issues where I have commented, but not contributed anything. It was under a section called "Public Activity".
This function seems to have been removed. I can not find anything about it on the help page about profiles.
Does anybody have any information on when and why this was removed?
You can do this with an advanced search query. In the Issues search box, enter "commenter:username".
Or if you want to search a specific repo: "RepositoryName commenter:username".
This link is quite useful, it's a live feed of all issues you've commented.
https://github.com/notifications/subscriptions?reason=comment
Alternatively, this link is also helpful and is probably what the OP asked (issues where one has written comments):
https://github.com/search?l=&q=commenter%3AVadorequest+is%3Aissue&type=issues
Replace "Vadorequest" by the username you're looking for
You can also use the global search with commenter:Vadorequest is:issue to achieve the same result
Also, if you want to track discussions you participated in, this link might help:
https://github.com/search?l=&q=commenter%3AVadorequest&type=discussions
Replace "Vadorequest" by the username you're looking for
You can also use the global search with commenter:Vadorequest to achieve the same result
This 4th (and last) is not related to the OP's question, but might come in handy. It lists all PR you were requested as reviewer.
https://github.com/notifications/subscriptions?reason=review_requested
Type involves:<username> in the search box on the GitHub's main page. This will find all the issues that the specified user commented on, was assigned to or mentioned in.
For example, if the user's name on GitHub is unclebob, the search query should look like:
involves:unclebob
Or when searching information about yourself if you're logged in to GitHub, simply:
involves:#me
Note, that unlike involves similar search qualifiers - author and commenter - will omit certain results from the search:
author will find only the issues that were started by the user; if the specified user comments on the issue that was started by someone else, author query won't return it in the search results.
E.g., compare involves:unclebob and author:unclebob type:issue.
commenter will find only those issues where the specified user commented second or later (creator of the first comment in an issue is considered its author and not a commenter); if the user starts an issue and then never comments on it, the commenter query won't return it in the search results.
E.g., compare involves:unclebob and commenter:unclebob.
In other words, when it comes to searching comments, author and commenter return only a subset of involves' results. So I recommend using involves not to miss anything.
Since GitHub Universe 2016, the profile page has changed.
It still has a "Contribution activity" though, which includes your own comments. But you might need to click on "Show more activity" to see past the last few weeks.
And you can email yourself your own activity since last June: "Email updates about your own activity".
If you want a list of all issues where you either created them or were a commenter on them, this link works best:
https://github.com/notifications/subscriptions?reason=author,comment

Custom placeholders in user story

I am trying to publish user stories on a facebook user's wall using graph api.
My use case is like this:
the user wrote an article that regards a specific community
I created one action 'writes' and two objects 'article' and 'community'.
The two objects have each their pages on my website, where I created all the corresponding meta data for open graph. Tested with the Open Graph Object Debugger and it looks fine.
Now I wanted to customize the way the story is shown.
The default sentence is for example
"[user] wrote [article.noun] via [appname]"
(brackets are there just to identify placeholders)
but I would like to include information about the community.
So what I did is add a property to the write action, called community that expects a reference to a community object.
Then I changed the sentence to:
"[user] wrote [article.noun] on community.title via [appname]"
via triboom demo"
but community.title is just treated as plain text and not as a placeholder.
Is there a way to tell FB to use the property value in the sentence?
I could not find any documentation on this.
TIA
s
Ok, just found out you need to use {object.property} syntax (doc is here https://developers.facebook.com/docs/opengraph/creating-custom-stories#variations)
Will investigate more and update the answer if it works.
Thank you very much for posting that!
How can the placeholders be referenced if there are more than one objects in the sentence? Like, for example, in the "One to Two" sentence:
"[user] wrote [article1.noun] and [article2.noun] on community.title via [appname]"
Please excuse for posting this as an answer. Unfortunately, I lack the reputation to comment.

How to create an open field poll on blogger

I need to create a poll/form with a few questions. The issue is that the possible answers are too varied to be able to predict them and put them as options (eg: "favourite fruit"), so I need it to be an open field option (as in the user can fill in his own answer). Then I need that input to be published on my blogger page/post.
eg:
Favourite color:
Blue
Favourite fruit:
Apple
Is there anyway to do that? I dont know which way to start looking, if in the direction of polls, questionnaires or forms.
Any piece of advice would be much appreciated.
Thank you
Sorry, Blogger doesn't provide any option to directly allow users to publish answers from polls into blog post.
You may use free online form generator websites ( Google Docs Forms , emailmeform and other form generating tools) to get the poll result in your email.
And manually add the data to your blog post.

Is there a list of facebook graphpaths one can use?

I'm playing around with the facebook api and finding it... extremely... frustrating. I suspect I'm not looking in the right spot, so apologies in advance.
All the resources I read seem to think that this page is useful. I'm finding just the opposite (as much as i like "tables of contents" in books, online i find them poor. You cannot really "search" a table of content of that code or key word and instead have to open up every link, which is silly in 2013).
Is there some sort of resource - facebook approved or not - that lists all the "graphpaths" one can use?
I'm aware - somewhat - of the "me" graphpath, but what are the others?
I personally use Graph API Explorer to explore it.
There exits 2 different choices of starting path. Either /me or /{id}.
That ID can be personid, pageid or any facebookid.