I`m developing an application that needs to keep some Twitter4J statuses on a MySql database.
Where can I find a place with informations to help me model the table?
I`m developing an application that needs to keep some Twitter4J statuses on a MySql
Share
You should look at the twitter4j Status interface. It has all the information relating to a status including for example:
The Status object that you will create can also be used to retrieve arrays of information such as:
And mentions.
There is more functionality – check out the java doc here http://twitter4j.org/en/javadoc/index.html
How you implement this is obviously up to you. Twitter offers a number of APIs, more information can be found at twitter dev site under documentation.
When making your choice bare in mind that the REST API is rate limited meaning that you will only be able to make a certain number of requests for a given time period (again see docs for more info).
You also have access to the streaming API that pushes all data to your application based on factors such as keyword filters.
You can then design your database model.You could do this using standard MySQL library or if you are using java ee platform you could create and entity class like so :
note: you will need to create a data-source and persistence unit (there are many tutorials online surrounding this area. An example could be this article and others that it links to – JPA java code generation).
Sorry would have included more links to useful info but am limited because I am a new user here.