flickr-sdk
Version:
Almost certainly the best Flickr API client in the world for node and the browser
32 lines (31 loc) • 777 B
TypeScript
import type { Auth, Transport } from "../types";
export interface ReplaceFail {
stat: "fail";
err: {
code: number;
msg: string;
};
}
export interface ReplaceOK {
stat: "ok";
photoid: {
secret: string;
originalsecret: string;
_content: string;
};
}
export type ReplaceResponse = ReplaceFail | ReplaceOK;
export interface Replace {
(id: string, file: string | Blob): Promise<{
id: string;
secret: string;
originalsecret: string;
}>;
}
export declare class ReplaceService {
private transport;
private auth;
constructor(transport: Transport, auth: Auth);
replace(id: string, file: string | Blob): ReturnType<Replace>;
getBlob(file: string | Blob): Promise<Blob>;
}