Giter VIP home page Giter VIP logo

rho-twitter's Introduction

RhoTwitter

About

This application is a job technical challenge.

Checklist

  • Get Twitter public feed using its streaming API (prefer data push over polling) ✅
  • Search for a word provided by the user. That should produce a flow of data big enough for our purposes. ✅
  • Once collected, the tweets will be included in a view. ✅
  • Every tweet has a lifespan, meaning that after that time, they will have to be removed from the list. 
 ✅
  • Make this lifespan easy to tune in code. ✅
  • If the connection is interrupted or the app is run offline, the tweets that 
were alive during the previous execution will be shown until a connection 
is established. 
 ✅
  • Use stock framework UI elements. 
 ✅

To deploy this application

Make sure you have a file called secrets.xml with your Twitter Application Credentials:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="consumer_key">XXXXX</string>
    <string name="consumer_secret"XXXXX></string>
    <string name="access_token">XXXXX</string>
    <string name="access_token_secret">XXXXX</string>
</resources>

Libraries

  • GSON is a utility for serializing and unserializing JSON objects. It is awesome.
  • Retrofit2 is a high-level REST abstraction on top of HTTP for interacting with APIs. It may use OkHttp as HTTP client backend.
  • signpost is a utility for OkHttp which is the facilitates the signing HTTP messages on the Java platform in conformance with the OAuth Core 1.0a standard.
  • OkHTTP is an HTTP Client. Retrofit needs to perform HTTP operations.

In this repository

  • Master: Twitter4j Implementation
  • retrofit_impl: Retrofit-based implementation

My first choice was using Retrofit + signpost, but I had a little difficulty in understanding how to do it and I ended losing more time than needed on that. As such, I decided to use Twitter4j, because I wanted to focus on the application development itself (and not on the authentication workflow). Also, Twitter4j is very complete, Android compatible, and multi-thread enabled (it uses OkHttp in its implementation).

In the end, I felt a little like I cheated, as consuming the API is an important part. So, in the branch retrofit_impl I had rebuilt the data fetch part of the application with retrofit and signpost.

rho-twitter's People

Contributors

lricardo avatar

Stargazers

Manish Verma avatar Amanda Hinchman-Dominguez avatar Rui Espinha Ribeiro avatar José Ferrão avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.