Coder Social home page Coder Social logo

firesim / twitcurl-riscv Goto Github PK

View Code? Open in Web Editor NEW

This project forked from swatkat/twitcurl

0.0 5.0 1.0 9.18 MB

twitcurl is a pure C++ library for twitter APIs. Fork hacked-up to run on firesim-software/RISC-V systems and post a tweet.

CMake 0.04% C++ 29.98% Makefile 0.50% C 69.48%

twitcurl-riscv's Introduction

Posting to twitter from a RISC-V system

This is 100% demo-engineering. Original codebase is:

https://github.com/swatkat/twitcurl

How to run on a RISC-V system with internet access

  1. assumes you have RISC-V toolchain available as installed by firesim
  2. assumes you're using firesim-software
  3. sysroot is currently hardcoded (see Makefile)
  4. Create an app on twitter developer's site
  5. Paste consumer keys in the twitterClient.cpp file.
  6. Install twurl on a host machine to handle OAuth, take the keys it puts in ~/.twurlrc and copy them into files named twitterClient_token_key.txt and twitterClient_token_secret.txt.
  7. Run make in libtwitcurl. The lib/client distinction is meaningless in this fork, it just produces one binary called twitterClient.
  8. Configure buildroot with libopenssl and libcurl
  9. Copy twitterClient, twitterClient_token_key.txt, and twitterClient_token_secret.txt into firesim/sw/firesim-software/buildroot-overlay/
  10. Build images in firesim-software
  11. Boot a FireSim simulation, connect to the outside network as described in docs
  12. On the simulated system, set the date correctly by running date on a host machine, then giving this output to date -s in the simulation
  13. In the simulation, cd / and run ./twitterClient

Original project's readme below:

Introduction:

twitcurl is a pure C++ library for twitter APIs. twitcurl uses cURL for handling HTTP requests and responses. twitcurl has been tested on Microsoft Windows, Ubuntu and Debian. In fact, it works just fine on any operating system that supports cURL.

  • v1.1 Twitter REST APIs
  • JSON
  • SSL

OAuth

twitcurl supports OAuth authorization methods. Check twitterClient example code in trunk section to know about twitcurl OAuth flow. Also, check wiki page for more info: http://code.google.com/p/twitcurl/wiki/TwitcurlOAuthFlow

APIs

Currently twitcurl has wrappers for following twitter REST APIs:
Timeline methods:
statuses/public_timeline
statuses/friends_timeline
statuses/user_timeline
statuses/mentions

Status methods:
statuses/show
statuses/update
statuses/destroy

User methods:
users/show
statuses/friends
statuses/followers

Direct Message methods:
direct_messages
direct_messages/sent
direct_messages/new
direct_messages/destroy

Friendship methods:
friendships/create
friendships/destroy
friendships/show

Social Graph methods:
friends/ids
followers/ids

Account methods:
account/rate_limit_status

Favorite methods:
favorites
favorites/create
favorites/destroy

Block methods:
blocks/create
blocks/destroy
blocks/list
blocks/ids

Saved Search methods:
saved_searches
saved_searches/show
saved_searches/create
saved_searches/destroy

Trends methods:
trends
trends/current
trends/daily
trends/weekly
trends/available

Source:

  • twitcurl source is available in the repository in "Source" tab.
  • Includes Microsoft Visual C++ 6.0 and 2008 workspace for building on Windows; and Makefile for building on UNIX/Linux distroes.
  • Use SVN or tools like TortoiseSVN (http://tortoisesvn.net/) to check-out and download files.

Help needed?

See wiki section for more info on building and using twitcurl library.
http://code.google.com/p/twitcurl/wiki/WikiHowToUseTwitcurlLibrary

Note:

Example:

An example twitter client program using twitcurl as a static library is available in the "Downloads" section.
The Makefile in twitterClient is supposed to run under sudo, and the file is tested under Ubuntu 12.04.


Info:

twitcurl-riscv's People

Contributors

swatkat avatar daniel-lucio avatar sagark avatar nkigen avatar serbathome avatar

Watchers

Howard Mao avatar James Cloos avatar Albert Ou avatar Colin Schmidt 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.