Skip to content

Latest commit

 

History

History
44 lines (32 loc) · 618 Bytes

README.md

File metadata and controls

44 lines (32 loc) · 618 Bytes

yemot-api

install

npm i yemot-api

exemple

const yemot_api = require("yemot-api");

(async () => {

	const y = new yemot_api("0773137770", "1234");

	/** קבלת מספר יחידות */
	let r = await y.get_session();

	console.log(r);

	/** העלאת קובץ */
	const file = {
		value: "12345",
		options: {
			filename: "123.txt",
			contentType: "text/txt"
		}
	};

	r = await y.upload_file("ivr/123.txt", file);

	console.log(r);

	/** הורדת קובץ */
	try {
		r = await y.download_file("ivr/123.txt");
	} catch (error) {
		console.error(error);
	}

	console.log(r);

})();