Skip to content

Twitter4S is a Scala wrapper for the Twitter API.

License

Notifications You must be signed in to change notification settings

lrf141/Twitter4S

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Twitter4S is a Scala wrapper for the Twitter API.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages