I am not able to retrieve all the updates from a company page. I can only retrieve the last, happened 4 days ago, but not the previous, happened 1 month and more ago.
Has this anything to do with the new API that took effect on 12th of May?
This is the endpoint I use:
https://api.linkedin.com/v1/companies/1234567/updates?count=100&format=json&oauth2_access_token=xxx
As already stated, I don't get the posts older than 1 month but I can get all the posts that are 4 days or younger.
Also on their test company profile, I can only retrieve posts that are 4 days or less.
EDIT:
Scratch the last: On the test company profile I can retrieve up to the 25th of April 2015.
EDIT2: On the page I am trying to grab, there are dozens of updates, but I seem to get only the last 2 (the previous are more than a month old) - sorry for being repetitive, just trying to give as much context as possible.
This is seems like API limitation:
From https://developer.linkedin.com/docs/company-pages
Only the most recent 50 updates for events of type status-update will be returned. For all other event types, the request will return all the updates within the past 20 days, or 250 total updates - whichever comes first.
Related
I am working with ADs api and using keywordstats.
It worked well, now I am getting some weird responses, or maybe it should be like that.
I created AD 7 days ago, 24 days after using keywordstats and fields like, cpc, actions, impressions, unique_actions returned me good results, matched at what I was seeing on ADS manager. AD was live one day.
Now 6 days after after, actions and unique actions has only one element "attention_event"? Impressions by each interest are also weird, for each I am getting from 1 to 5? In total I have more then 5K impressions, how is this possible? I have tried with specific dates, for one day it returns this weird data, for other days just returns empty response.
Actions fields, 6 days ago contained and events from FB Pixel, now none is returned in response.
Is this supposed to work like this, or I am missing something?
I've also dealt with some bugginess with the keywordstats endpoint.
If you look at the API documentation, you'll see a particular line: "To query from a particular day in the last week:". It seems like Facebook doesn't allow you to query for keywordstats that aren't from the past week. The discrepancy between metrics might arise because of this.
For some more context, I've found that even the last seven days isn't a reliable indicator of retrievable dates. I had to query each date individually (using <API_VERSION>/<AD_ID>/keywordstats?date=YYYY-MM-DD) and see which ones don't return an empty object. The dates that do return a metric are the ones that you should use in your calculations.
I was wondering if Laravel has an implemented way to limit the submits of a form. I would like to work with a day limit that resets every day.
So for example: I want to limit the submits of a referal form. Each user can refer 3 times a day.
How do I manage the amount of submits? And how do I reset the limit every day?
When you're validating the form submission, you can query the database and count how many time this user (or IP address, or else, depending on what you use to track the users) submitted the form in the last day.
Laravel uses the Carbon library, and it provides very easy way to get the date of "one day ago", you could use that for your query.
The specific implementation will depend on how you track users and when you reset - at a set hour once per day, or the time doesn't matter as long as they don't submit a form more than three times in 24 hours.
I would like to store a list of all en.wikipedia articles in my database. For each article I want to store the pageid, title and the popularity. I thought about using the view count (over the last month) as a measurement for popularity but if that is not possible, I could imagine going for something else (maybe use the number of revisions). I'm aware of http://dumps.wikimedia.org/enwiki/latest/ and that I can get a full list of articles from there (current count 36508337). However, I can not find a clever way to get the view count for each article.
// Updates, Edits, ...
The suggested duplicate does not help me because
a) I was looking for a popularity measurement. The answer to the other questions just states that it is not possible to get the number of watchers for a page, which is fine with me.
b) There is no answer there that gives me the page views (or any other metric) for every page.
Okay I'm finally done. Here is what I did:
I found http://dumps.wikimedia.org/other/pagecounts-ez/ which provides page views per month. This seems promising but they don't mention the pageid so what I'm doing is getting a list of all articles from http://dumps.wikimedia.org/enwiki/latest/, create a mapping name->pageid and then parse the pagecount dump. This takes about 30 minutes, here are some statistics:
68% of the articles in the page count file do not exist in the latest dump. This is probably due to some users linking, for example, Misfits_(TV_series) while other link to Misfits_(tv_series) and even stuff like Misfits_%28TV_series%29... I did not bother with those because my program already took long enough to run.
The top 3 pages are:
2.1. Front page with 639 million views (in the last month)
2.2. Malware with 8.5 million views
2.3. Falcon 9 v1.1 with 4.7 million views (cool!)
I made a histogram for the number of pages with a certain view count, here it is:
I also plotted the number of pages I would have to deal with when I disregard all articles below a certain view count. Here it is:
Is the order of repositories for a user simply the order of entry? I cannot see any logic in what is at the top of, for example, thoughtbot.
I'm thinking of writing a tool to get my desired ordering using the API, but maybe if I grokked the order better I could scan the list easier and not feel so compelled.
For example, as of 2013-12-21 16:01, these are the top two items on Thoughtbot:
shoulda-matchers - Last updated a day ago
suspenders - Last updated a day ago
But then the top item does not say it was updated a day ago ;
Dec 18, 2013 - Make order option Rails 4.0.1-compatible - aff7bd7e2a - authored 20 days ago
And the second on the list says it was authored a day ago
Dec 20, 2013 - Add spring - 078237f9ed - authored a day ago
Update;
The pull request is not related to the dates, see below. The comments are not related either. Thus I conclude perhaps there is evidence of a github bug. I will send another note to them. Perhaps this detail will help!
The two Closed Pull requests as of 2013-12-30Mon.09:19:09
TOP item = 11d ago ;
https://github.com/thoughtbot/shoulda-matchers/pulls?direction=desc&page=1&sort=created&state=closed
Make order option Rails 4.0.1-compatible
This is a fix for #388. From the commit: The way that we figure out whether the value which is p…
by mcmire 11 days ago
3 comments
2ND ITEM
https://github.com/thoughtbot/suspenders/pulls?direction=desc&page=1&sort=created&state=closed
Add spring
It's good stuff, and Rails 4.1 will include Spring by default. We may as well get on this train e…
by jferris 10 days ago
1 comment
They're ordered by time of last commit, newest at the top.
If you have a look at the GitHub API it says that the repositories are ordered by their creation date. Github API for listing repositories
It seems that this is also the case if for your personal repositories in the repository view. (Just tested this on my account)
(EDIT: I just realized that for the account that you mentioned, the repos are ordered by their last commit. However this is not the case for my account. It seems that the ordering depends on the overall number of repos linked to the account)
in my app I'm displaying a list of EKEvents and I would like to display all events of a month in a UITableView, each section containing the respective days. Well, this works and I get all the data, I need, but the fetch is very slow.
The problem consists in events, which spread across multiple days.
Let's say I'm going on vacation from 10th of November until 17th of November.
My search predicate has a startDate with 1st of November and an endDate with 30th of November.
I do an enumerateEventsMatchingPredicate or eventsMatchingPredicate, whatever, both are slow.
I get an array in return with all events taking place in November, as well as my vacation.
But my vacation is just one EKEvent object. So if I want to display a monthly list view of events it would only appear once, on 10th of November, but for reasons of clarity I would to show it on every day it takes place, 10th, 11th, ... 17th.
So what I do is, iterate over each day in a month and do a fetch :-/ This way I get the correct amount of events that take place on a specific day, but ... it feels so complicated.
I already put the fetch into a dispatch_async, so the fetch doesn't block the UI and after the fetch is finished the tableView gets reloaded and cells redrawn. But it still takes time. No userfriendly time.
How do you perform those searches? Do you have any tips on how to speed up the search, maybe a little code snippet or can point me in the right direction!?
Is my question clear? :-/
Thanks,
-Martin.
Fetches are slow especially if there is a lot of recurring events. What I did in my app, is to fetch only once, and parse whole-day-multiple-spanning-day-events to chunks. I abstracted events: I create "date" class, which has NSString properties usable as section titles in table view, and one of its ivars is array with matching "events". "events" are not EKEvents, but my class, to which I copy needed properties from EKEvents. From multiple day spanning single whole day EKEvent I create corresponding "events". Parsing is quite quick - the slowdown is when getting properties from fetched recurring EKEvents.