Merge pull request #21 from azr/azr/public-http-api
allow to use ApiInternal as a library
This commit is contained in:
commit
d3dbc60b90
1 changed files with 2 additions and 2 deletions
|
|
@ -214,7 +214,7 @@ pub struct ApiInternal {
|
|||
type ApiState = Arc<ApiInternal>;
|
||||
|
||||
impl ApiInternal {
|
||||
fn new(session: Arc<Session>) -> Self {
|
||||
pub fn new(session: Arc<Session>) -> Self {
|
||||
Self {
|
||||
dht: session.get_dht(),
|
||||
startup_time: Instant::now(),
|
||||
|
|
@ -260,7 +260,7 @@ impl ApiInternal {
|
|||
make_torrent_details(&info_hash, handle.torrent_state().info(), only_files)
|
||||
}
|
||||
|
||||
async fn api_add_torrent(
|
||||
pub async fn api_add_torrent(
|
||||
&self,
|
||||
url: String,
|
||||
opts: Option<AddTorrentOptions>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue