beeptunes/Agent


Download


Step 1. Add the JitPack repository to your build file

Add it in your root settings.gradle at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url 'https://jitpack.io' }
		}
	}

Add it in your settings.gradle.kts at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url = uri("https://jitpack.io") }
		}
	}

Add to pom.xml

	<repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>

Add it in your build.sbt at the end of resolvers:

 
    resolvers += "jitpack" at "https://jitpack.io"
        
    

Add it in your project.clj at the end of repositories:

 
    :repositories [["jitpack" "https://jitpack.io"]]
        
    

Step 2. Add the dependency

	dependencies {
		implementation 'com.github.beeptunes:agent:1.0.3'
	}
	dependencies {
		implementation("com.github.beeptunes:agent:1.0.3")
	}
	<dependency>
	    <groupId>com.github.beeptunes</groupId>
	    <artifactId>agent</artifactId>
	    <version>1.0.3</version>
	</dependency>

                            
    libraryDependencies += "com.github.beeptunes" % "agent" % "1.0.3"
        
        

                            
    :dependencies [[com.github.beeptunes/agent "1.0.3"]]
        
        

Readme


Agent

An interface to benefit Persian Music

Gain Access to API Key

To obtain your API key, contact us and after agreeing on a contract, we'll give you access to the archive.

Installation

1. Add Jitpack to your repositories (project-level build.gradle)

allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}

2. Add Agent as a dependency (app-level build.gradle)

dependencies {
	        implementation 'com.github.beeptunes:Agent:1.0.0'
	}

3. Initialize Agent inside your Application class extension

class App extends Application {
  @Override
    public void onCreate() {
        super.onCreate();
        Agent.init(this, YOUR_API_KEY);
        }
}

Usage

You can make asynchronous calls by calling the Agent methods and giving it your desired callback.

Example:

For getting data for a track:

Agent.get().track((long) 503798065, new AgentCallback<Track>() {
            @Override
            public void onFailure (Call<Track> call, Throwable t) {
                super.onFailure(call, t);
            }

            @Override
            public void onResponse (Call<Track> call, Response<Track> response) {
                super.onResponse(call, response);
                Log.d(TAG, response.body().image);
            }
        });