Index
All Classes and Interfaces|All Packages|Constant Field Values
A
- Account - Class in ch.bztf.m226blb1.Database.Authentication
-
Account for managing the authentication and
credentials. - Account() - Constructor for class ch.bztf.m226blb1.Database.Authentication.Account
-
Creates a new
Accountwith theAccount.createdAtset to the current time. - Account(String, AuthAccount) - Constructor for class ch.bztf.m226blb1.Database.Authentication.Account
- accountRepository - Variable in class ch.bztf.m226blb1.Base.BaseService
-
AccountRepositoryfor the accounts with the authentication - AccountRepository - Interface in ch.bztf.m226blb1.Database.Repositories
-
Repository for the
accountdata. - addMedia(Media) - Method in class ch.bztf.m226blb1.Database.Entities.Post
-
Adds a
mediato the post. - addPost(Post) - Method in class ch.bztf.m226blb1.Database.Entities.User
-
Adds a
Postto theUser.postsof the user. - apiKey() - Method in record class ch.bztf.m226blb1.Auth.AuthAccount
-
Returns the value of the
apiKeyrecord component. - AuthAccount - Record Class in ch.bztf.m226blb1.Auth
-
Represents an
accountwith the authentication data. - AuthAccount(String, String, String) - Constructor for record class ch.bztf.m226blb1.Auth.AuthAccount
-
Creates an instance of a
AuthAccountrecord class. - AuthController - Class in ch.bztf.m226blb1.Auth
-
The rest controller for handling authentication.
- AuthController() - Constructor for class ch.bztf.m226blb1.Auth.AuthController
- AuthService - Class in ch.bztf.m226blb1.Auth
-
The service for the authentication related tasks.
- AuthService() - Constructor for class ch.bztf.m226blb1.Auth.AuthService
B
- BaseController - Class in ch.bztf.m226blb1.Base
-
This class is the base class for all other controllers.
- BaseController(BaseService) - Constructor for class ch.bztf.m226blb1.Base.BaseController
-
Constructor for the
BaseController. - BaseService - Class in ch.bztf.m226blb1.Base
-
This class is the base class for all other services.
- BaseService(Platform) - Constructor for class ch.bztf.m226blb1.Base.BaseService
-
Constructor which sets up all values
- BaseService(Platform, WebClient) - Constructor for class ch.bztf.m226blb1.Base.BaseService
-
Constructor which sets up all values
C
- CACHED_HOURS - Static variable in class ch.bztf.m226blb1.Database.Entities.User
-
How many hours the user will be a valid cache.
- ch.bztf.m226blb1 - package ch.bztf.m226blb1
- ch.bztf.m226blb1.Auth - package ch.bztf.m226blb1.Auth
- ch.bztf.m226blb1.Base - package ch.bztf.m226blb1.Base
- ch.bztf.m226blb1.Database.Authentication - package ch.bztf.m226blb1.Database.Authentication
- ch.bztf.m226blb1.Database.Entities - package ch.bztf.m226blb1.Database.Entities
- ch.bztf.m226blb1.Database.Repositories - package ch.bztf.m226blb1.Database.Repositories
- ch.bztf.m226blb1.Platforms.GraphQL - package ch.bztf.m226blb1.Platforms.GraphQL
- ch.bztf.m226blb1.Platforms.Instagram - package ch.bztf.m226blb1.Platforms.Instagram
- ch.bztf.m226blb1.Platforms.Twitter - package ch.bztf.m226blb1.Platforms.Twitter
- ch.bztf.m226blb1.Utils - package ch.bztf.m226blb1.Utils
- containsNumber(String) - Static method in class ch.bztf.m226blb1.Auth.Credentials
-
Checks if the string contains a digit.
- createAccount(AuthAccount) - Method in class ch.bztf.m226blb1.Auth.AuthService
-
Creates a new
accountwith an API-Key for the given Instagram email and password. - Credentials - Class in ch.bztf.m226blb1.Auth
-
The class for validating parameters and creating API-Keys.
D
- deleteAccount(String) - Method in class ch.bztf.m226blb1.Auth.AuthService
-
Deletes an
accountwith the given API-Key. - deleteByApiKey(String) - Method in interface ch.bztf.m226blb1.Database.Repositories.AccountRepository
-
Deletes an
accountby its api key - deleteKey(String) - Method in class ch.bztf.m226blb1.Auth.AuthController
-
Deletes an
accountwith the given API-key - docs() - Method in class ch.bztf.m226blb1.SnsApplication
E
- email() - Method in record class ch.bztf.m226blb1.Auth.AuthAccount
-
Returns the value of the
emailrecord component. - equals(Object) - Method in record class ch.bztf.m226blb1.Auth.AuthAccount
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in class ch.bztf.m226blb1.Database.Authentication.Account
- equals(Object) - Method in class ch.bztf.m226blb1.Database.Entities.Media
- equals(Object) - Method in class ch.bztf.m226blb1.Database.Entities.Post
- equals(Object) - Method in class ch.bztf.m226blb1.Database.Entities.User
- equalsIgnoreCase(String, String) - Static method in class ch.bztf.m226blb1.Utils.Helper
-
Compares the given
stringsfor equality while ignoring the case. - existsByCredStartsWith(String) - Method in interface ch.bztf.m226blb1.Database.Repositories.AccountRepository
-
Checks if an
accountwith the givenusernameexists. - extractLimit(Optional<Integer>) - Static method in class ch.bztf.m226blb1.Auth.Credentials
-
Extracts and validates the
limitto a integer.
F
- findByApiKey(String) - Method in interface ch.bztf.m226blb1.Database.Repositories.AccountRepository
-
Finds an
accountby its api key - findByAuthor(User) - Method in interface ch.bztf.m226blb1.Database.Repositories.PostRepository
- findByUsernameAndPlatform(String, Platform) - Method in interface ch.bztf.m226blb1.Database.Repositories.UserRepository
-
Finds a
userby the given username and platform.
G
- generateApiKey(AuthAccount) - Static method in class ch.bztf.m226blb1.Auth.Credentials
-
Creates an API-key for the given
account. - generateKey(AuthAccount) - Method in class ch.bztf.m226blb1.Auth.AuthController
-
Post method for generating an API-key for the given
account. - generateResponse() - Method in class ch.bztf.m226blb1.Utils.ResponseHandler
-
Creates a response entity from the current class.
- generateResponse(Object, String, HttpStatus) - Static method in class ch.bztf.m226blb1.Utils.ResponseHandler
-
Creates a response entity with a data, message and status.
- generateResponse(String, HttpStatus) - Static method in class ch.bztf.m226blb1.Utils.ResponseHandler
-
Creates a response entity with a message and status.
- getBaseWebClient() - Static method in class ch.bztf.m226blb1.Base.BaseService
-
Returns the
builderfor building theweb client - getInstance(Platform) - Static method in class ch.bztf.m226blb1.Utils.RateLimiter
-
Gets the rate limiter for the given platform.
- getJsonData(String, String, String) - Method in class ch.bztf.m226blb1.Base.BaseService
-
Gets the user json data from the API
- getPostRequestUri(String, int) - Method in class ch.bztf.m226blb1.Base.BaseService
-
Gets the uri for requesting the posts data
- getPostRequestUri(String, int) - Method in class ch.bztf.m226blb1.Platforms.Instagram.InstagramService
- getPostRequestUri(String, int) - Method in class ch.bztf.m226blb1.Platforms.Twitter.TwitterService
- getPosts() - Method in class ch.bztf.m226blb1.Database.Entities.User
-
Gets the
User.postsof the user. - getPosts(String, String, int) - Method in class ch.bztf.m226blb1.Base.BaseService
- getPosts(String, String, Optional<Integer>) - Method in class ch.bztf.m226blb1.Base.BaseController
-
Gets the
postsof a user by itsusername. - getPosts(String, String, Optional<Integer>) - Method in class ch.bztf.m226blb1.Platforms.Instagram.InstagramController
- getPosts(String, String, Optional<Integer>) - Method in class ch.bztf.m226blb1.Platforms.Twitter.TwitterController
- getUser(String, String) - Method in class ch.bztf.m226blb1.Base.BaseService
- getUser(String, String) - Method in class ch.bztf.m226blb1.Base.BaseController
-
Gets the stats of a user by its
username. - getUser(String, String) - Method in class ch.bztf.m226blb1.Platforms.Instagram.InstagramController
- getUser(String, String) - Method in class ch.bztf.m226blb1.Platforms.Twitter.TwitterController
- getUserRequestUri(String) - Method in class ch.bztf.m226blb1.Base.BaseService
-
Gets the uri for requesting the user data
- getUserRequestUri(String) - Method in class ch.bztf.m226blb1.Platforms.Instagram.InstagramService
- getUserRequestUri(String) - Method in class ch.bztf.m226blb1.Platforms.Twitter.TwitterService
- GIF - Enum constant in enum class ch.bztf.m226blb1.Database.Entities.MediaType
-
GIFmedia type. - GraphQLEndpoint - Class in ch.bztf.m226blb1.Platforms.GraphQL
-
GraphQL Endpoint for the GraphQL API.
- GraphQLEndpoint() - Constructor for class ch.bztf.m226blb1.Platforms.GraphQL.GraphQLEndpoint
H
- hashCode() - Method in record class ch.bztf.m226blb1.Auth.AuthAccount
-
Returns a hash code value for this object.
- hashCode() - Method in class ch.bztf.m226blb1.Database.Authentication.Account
- hashCode() - Method in class ch.bztf.m226blb1.Database.Entities.Media
- hashCode() - Method in class ch.bztf.m226blb1.Database.Entities.Post
- hashCode() - Method in class ch.bztf.m226blb1.Database.Entities.User
- hasMedia() - Method in class ch.bztf.m226blb1.Database.Entities.Post
-
Checks if the post contains a
media. - Helper - Class in ch.bztf.m226blb1.Utils
-
Helper class for the project.
I
- IMAGE - Enum constant in enum class ch.bztf.m226blb1.Database.Entities.MediaType
-
Imagemedia type. - INSTAGRAM - Enum constant in enum class ch.bztf.m226blb1.Database.Entities.Platform
-
The
Instagramplatform. - InstagramController - Class in ch.bztf.m226blb1.Platforms.Instagram
- InstagramController(InstagramService) - Constructor for class ch.bztf.m226blb1.Platforms.Instagram.InstagramController
-
Constructor for the
InstagramController. - InstagramService - Class in ch.bztf.m226blb1.Platforms.Instagram
- InstagramService() - Constructor for class ch.bztf.m226blb1.Platforms.Instagram.InstagramService
-
Constructor for the
InstagramService. - isValidCache() - Method in class ch.bztf.m226blb1.Database.Entities.User
-
Check if the cached user is still valid (not older than 12 hours)
- isValidUsername(String) - Static method in class ch.bztf.m226blb1.Auth.Credentials
-
Checks if the username is valid.
L
- LIMIT - Static variable in class ch.bztf.m226blb1.Utils.RateLimiter
-
The limit (900) of requests.
M
- main(String[]) - Static method in class ch.bztf.m226blb1.SnsApplication
-
The main method with starts the application.
- mapJsonToPosts(String, int) - Method in class ch.bztf.m226blb1.Platforms.Twitter.TwitterService
- mapJsonToPosts(String, int) - Method in class ch.bztf.m226blb1.Platforms.Instagram.InstagramService
- mapJsonToPosts(String, int) - Method in class ch.bztf.m226blb1.Base.BaseService
-
Maps the JSON data to a set of
posts - mapJsonToUser(String) - Method in class ch.bztf.m226blb1.Base.BaseService
-
Maps the JSON data to a
userobject - mapJsonToUser(String) - Method in class ch.bztf.m226blb1.Platforms.Instagram.InstagramService
- mapJsonToUser(String) - Method in class ch.bztf.m226blb1.Platforms.Twitter.TwitterService
- Media - Class in ch.bztf.m226blb1.Database.Entities
-
Entity for managing the media.
- Media() - Constructor for class ch.bztf.m226blb1.Database.Entities.Media
-
Default constructor.
- Media(MediaType, String) - Constructor for class ch.bztf.m226blb1.Database.Entities.Media
-
Constructor for creating a new media.
- MediaType - Enum Class in ch.bztf.m226blb1.Database.Entities
-
Enum for the
media'stype.
P
- password() - Method in record class ch.bztf.m226blb1.Auth.AuthAccount
-
Returns the value of the
passwordrecord component. - Platform - Enum Class in ch.bztf.m226blb1.Database.Entities
-
Enum for the
user'splatform. - Post - Class in ch.bztf.m226blb1.Database.Entities
-
Root entity for the posts.
- Post() - Constructor for class ch.bztf.m226blb1.Database.Entities.Post
-
Default constructor.
- Post(String, Instant, int, int, Set<String>, String) - Constructor for class ch.bztf.m226blb1.Database.Entities.Post
-
Creates a new
Postwith all fields set. - postRepository - Variable in class ch.bztf.m226blb1.Base.BaseService
-
PostRepositoryfor saving the posts - PostRepository - Interface in ch.bztf.m226blb1.Database.Repositories
-
Repository for the
postentity. - posts(DgsDataFetchingEnvironment, Optional<Integer>) - Method in class ch.bztf.m226blb1.Platforms.GraphQL.GraphQLEndpoint
-
Gets
limitposts from a user
R
- RateLimiter - Class in ch.bztf.m226blb1.Utils
-
This class is used to limit the amount of requests.
- regenerateAPIKey(AuthAccount) - Method in class ch.bztf.m226blb1.Auth.AuthService
-
Regenerates the API-Key for the given
account. - regenerateKey(AuthAccount) - Method in class ch.bztf.m226blb1.Auth.AuthController
-
Put method for regenerating an API-key for the given
account - removeMedia(Media) - Method in class ch.bztf.m226blb1.Database.Entities.Post
-
Removes a
mediafrom the post. - ResponseHandler<T> - Class in ch.bztf.m226blb1.Utils
-
Handler for the response of the REST API.
- ResponseHandler(String, HttpStatus) - Constructor for class ch.bztf.m226blb1.Utils.ResponseHandler
-
Constructor with the message and the status.
- ResponseHandler(T, String, HttpStatus) - Constructor for class ch.bztf.m226blb1.Utils.ResponseHandler
-
Constructor for all fields.
S
- service - Variable in class ch.bztf.m226blb1.Base.BaseController
-
BaseServicefor requesting the data - setAiPrediction(String) - Method in class ch.bztf.m226blb1.Database.Entities.Post
-
Sets the
AI predictionto the given value. - setAuthor(User) - Method in class ch.bztf.m226blb1.Database.Entities.Post
-
Sets the
authorof the post. - setBio(String) - Method in class ch.bztf.m226blb1.Database.Entities.User
-
Sets the
User.bioto the given value. - setDescription(String) - Method in class ch.bztf.m226blb1.Database.Entities.Post
-
Sets the
Post.descriptionto the given value. - setName(String) - Method in class ch.bztf.m226blb1.Database.Entities.User
-
Sets the
User.nameto the given value. - setPost(Post) - Method in class ch.bztf.m226blb1.Database.Entities.Media
-
Sets the post of the media.
- setPosts(Set<Post>) - Method in class ch.bztf.m226blb1.Database.Entities.User
-
Sets the
User.postsof the user. - setProfilePictureUrl(String) - Method in class ch.bztf.m226blb1.Database.Entities.User
-
Sets the
User.profilePictureUrlto the given value. - setUrl(String) - Method in class ch.bztf.m226blb1.Database.Entities.Media
-
Sets the
Media.urlof the media. - setUsername(String) - Method in class ch.bztf.m226blb1.Database.Entities.User
-
Sets the
User.usernameto the given value. - setWebsite(String) - Method in class ch.bztf.m226blb1.Database.Entities.User
-
Sets the
User.websiteto the given value. - SnsApplication - Class in ch.bztf.m226blb1
-
M226B - LB1 - SnsApplication
- SnsApplication() - Constructor for class ch.bztf.m226blb1.SnsApplication
-
Hidden constructor for the
SnsApplicationclass. - status() - Method in class ch.bztf.m226blb1.Base.BaseController
-
Check if the controller is up and running.
- status() - Method in class ch.bztf.m226blb1.Platforms.Instagram.InstagramController
- status() - Method in class ch.bztf.m226blb1.Platforms.Twitter.TwitterController
T
- TEXT - Enum constant in enum class ch.bztf.m226blb1.Database.Entities.MediaType
-
Textmedia type. - toString() - Method in record class ch.bztf.m226blb1.Auth.AuthAccount
-
Returns a string representation of this record class.
- toString() - Method in class ch.bztf.m226blb1.Database.Authentication.Account
- toString() - Method in class ch.bztf.m226blb1.Database.Entities.Media
- toString() - Method in class ch.bztf.m226blb1.Database.Entities.Post
- toString() - Method in class ch.bztf.m226blb1.Database.Entities.User
- toUpperCaseNullable(String) - Static method in class ch.bztf.m226blb1.Utils.Helper
-
Converts the given
stringto a upper case string. - trimToSize(String, int) - Static method in class ch.bztf.m226blb1.Utils.Helper
-
Trims the given string to the given length, appending
...if the string is longer than the givenlength. - tryConsume(long) - Method in class ch.bztf.m226blb1.Utils.RateLimiter
-
Checks if the given platform is allowed to make a request.
- TWITTER - Enum constant in enum class ch.bztf.m226blb1.Database.Entities.Platform
-
The
Twitterplatform. - TwitterController - Class in ch.bztf.m226blb1.Platforms.Twitter
- TwitterController(TwitterService) - Constructor for class ch.bztf.m226blb1.Platforms.Twitter.TwitterController
-
Constructor for the
TwitterController. - TwitterService - Class in ch.bztf.m226blb1.Platforms.Twitter
- TwitterService(String) - Constructor for class ch.bztf.m226blb1.Platforms.Twitter.TwitterService
-
Constructor for the
TwitterService.
U
- UNKNOWN - Enum constant in enum class ch.bztf.m226blb1.Database.Entities.MediaType
-
Unknownmedia type. - user(String, String, Platform) - Method in class ch.bztf.m226blb1.Platforms.GraphQL.GraphQLEndpoint
-
Get a user from a platform
- User - Class in ch.bztf.m226blb1.Database.Entities
-
User entity for managing the user data and their
posts. - User() - Constructor for class ch.bztf.m226blb1.Database.Entities.User
-
Creates a new
Userwith theUser.cachedSinceset to the current time. - User(Platform, String, String, String, String, String, int, int, boolean, boolean) - Constructor for class ch.bztf.m226blb1.Database.Entities.User
-
Creates a new
Userwith theUser.cachedSinceset to the current and all fields set. - userRepository - Variable in class ch.bztf.m226blb1.Base.BaseService
-
UserRepositoryfor caching the users - UserRepository - Interface in ch.bztf.m226blb1.Database.Repositories
-
Repository for the User Entity
V
- validateApiKey(String) - Static method in class ch.bztf.m226blb1.Auth.Credentials
-
Validates if the
api keyis valid. - validateCredentials(AuthAccount) - Static method in class ch.bztf.m226blb1.Auth.Credentials
- valueOf(String) - Static method in enum class ch.bztf.m226blb1.Database.Entities.MediaType
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class ch.bztf.m226blb1.Database.Entities.Platform
-
Returns the enum constant of this class with the specified name.
- values() - Static method in enum class ch.bztf.m226blb1.Database.Entities.MediaType
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class ch.bztf.m226blb1.Database.Entities.Platform
-
Returns an array containing the constants of this enum class, in the order they are declared.
- VIDEO - Enum constant in enum class ch.bztf.m226blb1.Database.Entities.MediaType
-
Videomedia type.
W
- webClient - Variable in class ch.bztf.m226blb1.Base.BaseService
-
WebClient for requesting data from the API
All Classes and Interfaces|All Packages|Constant Field Values