danieldevine / bird-docs Goto Github PK
View Code? Open in Web Editor NEWDocumentation site for Bird Elephant
Home Page: https://birdelephant.com
Documentation site for Bird Elephant
Home Page: https://birdelephant.com
I was excited to find BirdElephant, looks like a great tool for a project I'm working on. However, as I was just getting my feet wet, I got frustrated just trying to run the sample code on https://birdelephant.com/tweets. Specifically, this line:
$tweets->search->recent($params);
was resulting in the errors:
PHP Notice: Undefined property: Coderjerk\BirdElephant\Tweets::$search
PHP Fatal error: Uncaught Error: Call to a member function recent() on null
Perhaps to most people the problem is immediately obvious, but it took me some hair-pulling and code-searching to realize that the sample code really should have been
$tweets->search()->recent($params);
That is, there should be a pair of parens after "search". It looks like several other bits of sample code on that page have the same issue, for instance
$tweets->count->recent($params);
(I didn't do a thorough search for other examples of the problem. There are likely several others.)
Unrelated issue: I think it would be helpful if the sample code in the docs gave examples of how to actually use the results of the method calls. So maybe something like:
echo $tweets->count()->recent($params)->meta->total_tweet_count;
and going back to search, something like
foreach ($tweets->search()->recent($params)->data as $t) { echo $t->text . "\n"; }
Obviously, I was able to figure this stuff out using var_dumps and the like, but having it more apparent in the sample code would definitely be helpful.
Thanks again for your work on this! Now that I'm over these hurdles, I'm excited to start using BirdElephant in my work!
The edit link on https://birdelephant.com/ goes to
https://github.com/danieldevine/bird-elephant/edit/main/docs/content/en/index.md
It should point to this repo instead.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.