Interface for databasing tweets? - json

I have just started a new project and step one is to go and collect a bunch of information. For this first step I need a script that takes a twitter username. The program will then grab the last five posts from the user, and place them into a database, preferably as a JSON file.
I have been looking into Twitter4J, and the Streaming API. While I feel these are both good resources that are very robust and contain a lot of functionality. I am struggling to find anything that just gives me a simple start. Ideally a step by step, get one post as text, kind of tutorial would be ideal, and then I can dive into the docs and find the modules I need and so on.
So is there any tutorials or lightweight frameworks that one may know of? I am open to any language, and any suggestions. Thanks in advance, and for taking the time to read through this!
TL;DR. Need a lightweight framework that handles twitter, or a link a beginner Twitter API tutorial.

If your interested in a good PHP framework and want an easier way to work with the Streaming API, I would highly recommend looking at the 140 server. It's a framework to start with rather then to integrate later, and it looks like your just starting out so it may be a good choice. Using the streaming API you can open up a firehose with your queries and items will be pushed to you. This definitely looks to be the right choice for your use case.
Also, since you now have the link to the server, take a look through the rest of this site. I don't think you'll find a better resource for Twitter tutorials and resources.
If your looking for something much simpler, and want to get your feet wet from the beginning with Twitter and if you've never worked with RESTful API's, take an additional look at the following.
Here is an article about integrating RESTful services with CI. Codeigniter is a nice PHP framework to start with and has a lot of resourceful documentation, The example they use in the tutorial is actually Twitter which is nice.
http://net.tutsplus.com/tutorials/php/working-with-restful-services-in-codeigniter-2/
Here is a more general article about the Twitter RESTful API
http://www.ibm.com/developerworks/xml/library/x-twitterREST/
and finally if your going with CI, have a look at this library that will make things that much easier. Especially if your working with oAuth and such. It basically abstracts the whole twitter API (less streaming) into easy to use CI calls.
. . and if you don't want to use the streaming API, for your use case, your going to want to cache the tweets. I don't know any specifically great articles for this, but it's a pretty popular method and should be easy to search for. You do this because the API is rate limited in most cases.

Related

Not sure about the way to approach to the IndexDB API and wrapper libraries?

I have started a crash course of IndexDB API. I have heard from the author that the API is a little bit confusing. Primarily, as we have been working with the promise pattern as this API doesn’t use this pattern. Secondary, there are different wrappers, one of them seems is from Github author’s personal library so I suppose he have created it.
However looking for a different flavor, I found this one: http://dexie.org/. Also supports the Promise pattern. See http://dexie.org/docs/Promise/Promise, http://dexie.org/docs/API-Reference#query-items . It seems “promising”.
Also I found that the IndexDB 2.0 API was created post the video time. It is already being supported since beginning of 2017. From a Mozilla developer, I found since Firefox 51 (Jan 2017) it is already there. And he wrote what’s the differences among 1 and 2 versions https://hacks.mozilla.org/2016/10/whats-new-in-indexeddb-2-0/
So my question is if at this point is better to use the wrapper libraries or to use the native IndexDB API in terms of cross-browsing and support and better practices?
It all depends on what you want to do with indexeddb -
If you are learning indexeddb for your interest or for knowledge then you should go for plain indexeddb. Learn and research as much you can, because it has too many apis and you will have to write code for every type of situation.
You want to use indexeddb in your project and dont have much time to explore indexeddb. You only want to do some database operations and release your project. In this case - you should go for indexedd library. This way you dont need to worry about indexeddb code . You will just write simple code using the library.
For instance : check out this article - https://dzone.com/articles/crud-operation-in-indexeddb-using-jsstore. How a library makes indexeddb so easy.
Hope this will help you.

Implement a http server with RESTful http API

I've started to learn backend development, focus on http server mainly.
But I'm really new to this, so it's a little out of focus for me, and I could really use some advice.
For example, if I try to implement something like this
A http server runs on linux/Windows
A private REST API which allows to POST a json object, plus a login mechanism, so only authorised user can do the POST.
Implement a public REST API which allows to GET the same json object
And here is my question:
Can I use Nodejs and express to implement all these? I also know little about them.
Do I need a Database to implement the login mechanism?
Is there any similar tutorial or best practise I can study from?
Regards
Ben
Yes, you can use NodeJS for this.
Not necessarily. You just need a way to authorise users. Most common is to use a database to store a username/email and password, but you could also look into using a third-party service for this, for example facebook or google
Yes, there is a lot of tutorials and especially best practices on this subject. Your question is too broad to link relevant material, but some terms you can use to google this yourself is "nodejs rest api" "rest api best practice". Passport.js is a good place to start for getting into authorising users. For REST-api, the closer you get to normal web standards, the better - Especially if other people than you are going to consume the api.
Node.js is a run-time environment/framework/platform for developing non-blocking I/O server side processes, services, or RESTful API's. You can start by learning what Node.js can do before you go on developing a login story and, and a restful endpoint here
Next if you intend to go all the way and learn full-stack web development start from here, This will guide you to learn Node.js , Express.js, Mongodb, and finally Angular.js for front-end. Good luck and happy coding
Yes, you can use Node.js and Express.js. I recomend you to read some articles about REST and TDD from this amazing blog, especialy this or this.

Api connector guidelines(not creating a API)

I started using Laravel around a year ago and I am currently making an application where I have to transfter data between multiple REST JSON API's.
I can find a lot of articles how to create API's. However I can't really find any information how to practicly connect to API's and using them in an object orientated way inside Laravel.
I'm thinking about using a model approach combined with interfaces to keep track of API version changes. I want to use repositories to make the API call. Inside this repositories i will use restable method names(e.g. GET,PATCH,POST,DELETE).
I am not sure this is a best practice and I understand this is a question where people can have a lot of opinions about.
If someone can give me some basic guidelines or starting points it would be greatly appriciated.

jQMobi documentation mirror

Just got started and running with jqMobi, which is now called 'intel's application framework' (cheesy name eh)
Along with intel's porting to their new site, they forgot to put the full docs online (at least I can't find it). Now there's only minimal documentation, like the getting started. I'd like to get on with it.
Anyone knows where the (full) docs are hosted? I really hate to go look for another framework again.
The documentation is all there. The only thing they did not add was the "testdrive", which is just the kitchen sink sample found in github
In my opinion the docs are somewhat scattered, but there's some helpful stuff if you can find it. I keep bookmarks for these links. There are some links from those that get you to more stuff.
http://html5dev-software.intel.com/documentation/jqmobiapis/index.html
http://app-framework-software.intel.com/documentation.php?r=9057
http://developer.html5dev-software.intel.com/
http://www.html5dev-software.intel.com/documentation/
Actually they split off where appMobi is a cloud services company to support apps, and Intel took the part to build the apps. So you may still need/want appMobi. Their docs are on their site of course. There is still some duplication on the appMobi site.
Technically I don't think jqMobi is the same thing as the Intel App Framework, but at the same time I have a hard time understanding what's called what anymore. I'm sure they'll clear this up over time. I hope they find names that can be useful tags on stackoverflow.com!

Plug-And-Play Blogging Engine?

OK, the title is a bit misleading I suppose, but only because I'm not really sure how to condense down what I'm looking for.
Currently, I have my own personal site that I've built which rests on a CMS that I also built. I wasn't really interested in blogging when I started the site (it was mainly to showcase my Android apps), so I only added basic 'blogging' features like posting news items and such.
As of late, however, I have taken a keen interest in blogging, and would like to pursue it on my website. The issue I'm having is that I don't particularly want to invest the time it would take to expand upon my CMS to include things like archives, comments, search, and all of the other various blogging-related features that are standard.
So what I'm looking for is a blogging engine that I can plug into my existing site framework. I have found tons of services that are platforms that you build on top of (i.e Wordpress, Chyrp, and TextPattern just to name a few) but that's not what I want. I'm looking for something that I integrate into my site, not something I integrate my site into (if that makes sense).
So you want a third-party application that can plug in to a proprietary custom-built blogging/CMS framework? Unless you patterned your framework after some other publicly available and widely used framework then I think it is very unlikely that such a thing exists.
I'd suggest maybe seeing if there's a way to come up with a database migration script that will take the data that your custom framework is using and translate it into something that an existing blogging platform can understand. Then just completely replace your custom platform with the prebuilt one.