Skip to content

code-a-man/avesis-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

avesis-api



📥 Install

$ npm install avesis-api

⚙️ How to use

const { getDocuments } = require("avesis-api");
// Example URL: https://avesis.aaa.edu.tr/bbb
const options = {
  university: "aaa", // required, University name in URL
  teacher: "bbb", // required, Teacher name in URL required
  limit: 1, // optional, Number of documents to return from last. default = Infinity
  html: false, // optional, return description as HTML string. default = false
};
getDocuments(options).then(function (response) {
  console.log(response);
});

📤 Example Output

{
	
	teacher: {
		name: 'Asst. Prof. Aaa',
		img: 'https://avesis.aaa.edu.tr/user/image/123123'
  	},
  	list: [
		{
			title: "Last Announcement",
			type: "Duyuru",
			date: "23.02.2022",
			description: 'Description',
  		},
  		{
			title: "Announcement with File",
			type: "Ders Notu",
			date: "20.02.2022",
			description: "Description\nwith\nmultiline",
			link: "https://avesis.aaa.edu.tr/resume/downloadfile/bbb?key=1231231-1231-1231-1231-123123123123",
			filename: "slide.pdf",
			fileExt: "pdf",
			locked: true,
  		},
	]
}

Copyright (c) 2022 Code a Man

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published