Giter Site home page Giter Site logo

twitter4s's Introduction

scala version sbt version TRAVIS_CI STATUS

Twitter4S

Twitter4S is a Scala wrapper for the Twitter API.

Description

Twitter4S is an unofficial Scala library for the TwitterAPI.
With Twitter4S, you can easily integrate your Scala project with the Twitter Service.
100% Pure Scala - works on any Scala Platform version 2.12 or later.

Source Code

This library is always published in this repository.

How to use

get instance and init

val twitter:Twitter = TwitterFactory.getInstance
twitter.initialize("consumer key", "consumer secret key",
                   "access token", "access token secret")

post your tweet

twitter.updateStatus("Hello,World!!") //return TweetStatus

get your home timeline

twitter.getHomeTimeLine //return home timeline data as Seq[UserTimeLine]

get your followers List as Seq

twitter.getFollowersList // return followers list as Seq[UserArray]

get your friends(follow) List as Seq

twitter.getFriendsList // return friends list as Seq[UserArray]

get user timeline as Seq

twitter.getUserTimeLine("screen_name")

searchTweet

twitter.searchTweet("key_words")

searchUser

twitter.searchUser("key_words")

get FavoriteList

twitter.getFavoriteList("screen_name") // return user favorite list as Seq

create Favorite

twitter.createFavorite("tweet_ids or screen_name")

destroy Favorite

twitter.destroyFavorite("tweet_ids or screen_name")

create Friendships

twitter.createFriendshipsByName("screen_name")
or
twitter.createFriendshipsByIds("user_id")

destroy Friendships

twitter.destroyFriendshipsByName("screen_name")
or
twitter.destroyFriendshipsByIds("user_id")

create Retweet

twitter.createRetweet("tweet_ids")

destroy Retweet

twitter.destroyRetweet("tweet_ids")

Install

You can integrate the latest Twitter4S build easily by using sbt.
Add this code on your build.sbt or Build.scala.

resolvers += "Maven Repo on github" at "https://lrf141.github.io/Twitter4S/"

libraryDependencies ++= Seq(
     "Twitter4S" % "twitter4s_2.12" % "1.0.0"
)

License

Twitter4S is released under MIT License.

MIT License

Copyright (c) 2017 K.Takeuchi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

twitter4s's People

Contributors

lrf141 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

twitter4s's Issues

About consolidation of HttpRequest method.

Hello, I have one suggestion. HttpRequest.scala in net package has two method that get and post.But written content same mostly. In there, I suggest that method name send in method param. In addition,If you want to POST request only then, setRequestMethod("POST").
image

if(mehod.equal("POST")){
    urlconnection.setRequestMethod("POST");
}

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.