{"id":24617714,"url":"https://github.com/jacoblincool/moodle-export","last_synced_at":"2025-05-07T05:24:58.806Z","repository":{"id":194709824,"uuid":"691589635","full_name":"JacobLinCool/moodle-export","owner":"JacobLinCool","description":"A streamlined library for retrieving data from Moodle.","archived":false,"fork":false,"pushed_at":"2025-04-26T15:29:02.000Z","size":321,"stargazers_count":0,"open_issues_count":13,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-26T16:30:06.730Z","etag":null,"topics":["data","moodle"],"latest_commit_sha":null,"homepage":"http://jacoblin.cool/moodle-export/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JacobLinCool.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-09-14T13:38:37.000Z","updated_at":"2023-09-14T13:59:43.000Z","dependencies_parsed_at":"2023-11-14T21:27:26.913Z","dependency_job_id":"fb8e0ad9-24d9-4b85-8c0a-2fff43bf22b6","html_url":"https://github.com/JacobLinCool/moodle-export","commit_stats":null,"previous_names":["jacoblincool/moodle-export"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobLinCool%2Fmoodle-export","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobLinCool%2Fmoodle-export/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobLinCool%2Fmoodle-export/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobLinCool%2Fmoodle-export/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JacobLinCool","download_url":"https://codeload.github.com/JacobLinCool/moodle-export/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252819657,"owners_count":21809061,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data","moodle"],"created_at":"2025-01-24T23:40:07.257Z","updated_at":"2025-05-07T05:24:58.768Z","avatar_url":"https://github.com/JacobLinCool.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Moodle Export\n\nA streamlined library for retrieving data from Moodle.\n\n[Documentation](https://jacoblincool.github.io/moodle-export/)\n\n## Example\n\n### An OOP approach\n\n```ts\nimport { MoodleExporter } from \"moodle-export\";\n\n// Initialize the exporter\nconst exporter = MoodleExporter.init({\n    base: \"https://moodle.example.com\",\n    username: \"username\",\n    password: \"password\",\n});\n\n// Get all courses and their attendees and activities\nconst courses = await exporter.courses();\nfor (const course of courses) {\n    console.log(course.fullname);\n    const attendees = await course.attendees();\n    const activities = await course.activities();\n    console.log({ attendees, activities });\n}\n```\n\n### A FP approach\n\n```ts\nimport { login } from \"moodle-export\";\n\nconst base = \"https://moodle.example.com\";\n\n// Create a fetcher\nconst fetcher = await login({\n    base,\n    username: \"username\",\n    password: \"password\",\n});\n\n// Get all courses and their attendees and activities\nconst courses = await fetch_course_list(fetcher, base);\nfor (const course of courses) {\n    console.log(course.fullname);\n    const attendees = await fetch_course_attendees(fetcher, base, course.id);\n    const activities = await fetch_course_activities(fetcher, base, course.id);\n    console.log({ attendees, activities });\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacoblincool%2Fmoodle-export","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacoblincool%2Fmoodle-export","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacoblincool%2Fmoodle-export/lists"}