{"id":20924904,"url":"https://github.com/gonzagadavid/calendar-json-api","last_synced_at":"2025-05-13T16:31:40.185Z","repository":{"id":45327241,"uuid":"439518754","full_name":"Gonzagadavid/calendar-json-api","owner":"Gonzagadavid","description":"The Calendar JSON API can be used to provide you with a calendar formatted as a 2D array.  For that, you may choose to query for the selected month, or the selected year, as explained in the endpoints below.","archived":false,"fork":false,"pushed_at":"2023-05-13T18:23:41.000Z","size":501,"stargazers_count":14,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T05:03:09.014Z","etag":null,"topics":["api","backend","calendar","eslint","express","jest","json","supertest","swagger","tsnode","typescript"],"latest_commit_sha":null,"homepage":"https://calendar-json-app.adaptable.app/month","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Gonzagadavid.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}},"created_at":"2021-12-18T03:31:03.000Z","updated_at":"2025-01-20T13:56:08.000Z","dependencies_parsed_at":"2024-11-19T05:53:25.006Z","dependency_job_id":null,"html_url":"https://github.com/Gonzagadavid/calendar-json-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gonzagadavid%2Fcalendar-json-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gonzagadavid%2Fcalendar-json-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gonzagadavid%2Fcalendar-json-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gonzagadavid%2Fcalendar-json-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gonzagadavid","download_url":"https://codeload.github.com/Gonzagadavid/calendar-json-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253981792,"owners_count":21994337,"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":["api","backend","calendar","eslint","express","jest","json","supertest","swagger","tsnode","typescript"],"created_at":"2024-11-18T20:28:00.264Z","updated_at":"2025-05-13T16:31:39.352Z","avatar_url":"https://github.com/Gonzagadavid.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Calendar JSON API {...} :calendar:\n\n## Sumary\n\n- [Introduction](#introduction)\n- [Instructions to start locally](#instructions-to-start-locally)\n- [Swagger documentation](#swagger-documentation)\n- [Endpoints](#endpoints)\n  - [Current month](#current-month)\n  - [Month name](#month-name)\n  - [Month name and year](#month-name-and-year)\n  - [Current year](#current-year)\n  - [Year](#year)\n- [Technologies](#technologies)\n- [Tests](#tests)\n- [Instructions to start tests locally](#instructions-to-start-tests-locally)\n- [Deployment](#deployment)\n\n--- \n\n# Introduction  \n\nThe Calendar JSON API can be used to provide you with a calendar formatted as a 2D array.\n\nFor that, you may choose to query for the selected month, or the selected year, as explained in the endpoints below.\n\n--- \n\n# Swagger documentation\n\nAccess the swagger documentation:\n\nProduction: https://calendar-json-app.adaptable.app/docs\n\nLocal: `http://localhost:3002/docs`\n\n---\n\n# Instructions to start locally\n\n- clone the repository `git clone git@github.com:Gonzagadavid/calendar-json-api.git`\n- enter the directory `cd calendar-json-api`\n- install the dependencies `npm install`\n- run the command `npm run dev`\n- the api will be available at `http://localhost:3002`\n\n---\n\n# Endpoints\n\n## Current month /month\n\nReturns the calendar of the current date.\n\n```url\nGET https://calendar-json-app.adaptable.app/month\n```  \n*E.G:*\n\nBeing the current date December 2021, the default response will be:\n\n```json\n{\n  \"December\":[\n    [  0,  0,  0,  1,  2,  3,  4],\n    [  5,  6,  7,  8,  9, 10, 11],\n    [ 12, 13, 14, 15, 16, 17, 18],\n    [ 19, 20, 21, 22, 23, 24, 25],\n    [ 26, 27, 28, 29, 30, 31,  0]\n  ],\n  \"year\": 2021\n}\n```\n\n*I.E:*\n\n**December 2021** \n\n| Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday |\n| :-----:| :-----:| :------:| :--------:| :-------:| :-----:| :-------:|\n|        |        |         | 1         | 2        | 3      | 4        |\n| 5      | 6      | 7       | 8         | 9        | 10     | 11       |\n| 12     | 13     | 14      | 15        | 16       | 17     | 18       |\n| 19     | 20     | 21      | 22        | 23       | 24     | 25       |\n| 26     | 27     | 28      | 29        | 30       | 31     |          |\n\n---\n\n## Month name /month/\\\u003cmonthName\\\u003e\n\nReturns current year`s month calendar.\n\n```url\nGET https://calendar-json-app.adaptable.app/month/\u003cmonthName\u003e\n```  \n*E.G:*\n\nBeing 2021 the current year, and November the desired month, the request must be sent as follows:\n\n```url\nGET https://calendar-json-app.adaptable.app/month/november\n```\nAnd the response will be:\n\n```json\n{\n  \"November\":[\n    [  0,  1,  2,  3,  4,  5,  6],\n    [  7,  8,  9, 10, 11, 12, 13],\n    [ 14, 15, 16, 17, 18, 19, 20],\n    [ 21, 22, 23, 24, 25, 26, 27],\n    [ 28, 29, 30,  0,  0,  0,  0]\n    ],\n  \"year\": 2021\n}\n```\n\n*I.E:*\n\n**November 2021** \n\n| Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday |\n| :-----:| :-----:| :------:| :--------:| :-------:| :-----:| :-------:|\n|        | 1      | 2       | 3         | 4        | 5      | 6        |\n| 7      | 8      | 9       | 10        | 11       | 12     | 13       |\n| 14     | 15     | 16      | 17        | 18       | 19     | 20       |\n| 21     | 22     | 23      | 24        | 25       | 26     | 27       |\n| 28     | 29     | 30      |           |          |        |          |\n\n---\n\n## Month name and year /month/\\\u003cmonthName\\\u003e?year=\\\u003cyearValue\\\u003e\n\nReturns the calendar for the desired month and year.\n\n```url\nGET https://calendar-json-app.adaptable.app/month/\u003cmonthName\u003e?year=\u003cyearValue\u003e\n```\n\n*E.G:*\n\nDesired month: October\nDesired year: 2012\n\n```url\nGET https://calendar-json-app.adaptable.app/month/october?year=2012\n```\n\nAnd the response will be:\n\n```json\n{\n  \"October\":[\n    [  0,  1,  2,  3,  4,  5,  6],\n    [  7,  8,  9, 10, 11, 12, 13],\n    [ 14, 15, 16, 17, 18, 19, 20],\n    [ 21, 22, 23, 24, 25, 26, 27],\n    [ 28, 29, 30, 31,  0,  0,  0]\n    ],\n  \"year\": 2012\n}\n```\n\n*I.E:*\n\n\n**October 2012** \n\n| Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday |\n| :-----:| :-----:| :------:| :--------:| :-------:| :-----:| :-------:|\n|        | 1      | 2       | 3         | 4        | 5      | 6        |\n| 7      | 8      | 9       | 10        | 11       | 12     | 13       |\n| 14     | 15     | 16      | 17        | 18       | 19     | 20       |\n| 21     | 22     | 23      | 24        | 25       | 26     | 27       |\n| 28     | 29     | 30      | 31        |          |        |          |\n\n---\n\n## Current year /fullyear\n\nReturns the complete calendar for the current year.\n\n```url\nGET https://calendar-json-app.adaptable.app/fullyear\n```\n\n*E.G:*\n\nBeing the current year 2021, the response will be:\n\n```json\n{\n  \"year\":2021,\n  \"January\":[\n    [  0,  0,  0,  0,  0,  1,  2],\n    [  3,  4,  5,  6,  7,  8,  9],\n    [ 10, 11, 12, 13, 14, 15, 16],\n    [ 17, 18, 19, 20, 21, 22, 23],\n    [ 24, 25, 26, 27, 28, 29, 30],\n    [ 31,  0,  0,  0,  0,  0,  0]\n    ],\n  \"February\":[\n    [  0,  1,  2,  3,  4,  5,  6],\n    [  7,  8,  9, 10, 11, 12, 13],\n    [ 14, 15, 16, 17, 18, 19, 20],\n    [ 21, 22, 23, 24, 25, 26, 27],\n    [ 28,  0,  0,  0,  0,  0,  0]\n    ],\n  \"March\":[\n    [  0,  1,  2,  3,  4,  5,  6],\n    [  7,  8,  9, 10, 11, 12, 13],\n    [ 14, 15, 16, 17, 18, 19, 20],\n    [ 21, 22, 23, 24, 25, 26, 27],\n    [ 28, 29, 30, 31,  0,  0,  0]\n    ],\n  \"April\":[\n    [  0,  0,  0,  0,  1, 2,  3],\n    [  4,  5,  6,  7,  8, 9, 10],\n    [11, 12, 13, 14, 15, 16, 17], \n    [18, 19, 20, 21, 22, 23, 24], \n    [25, 26, 27, 28, 29, 30,  0]\n    ],\n  \"May\":[\n    [  0,  0,  0,  0,  0,  0,  1],\n    [  2,  3,  4,  5,  6,  7,  8],\n    [  9, 10, 11, 12, 13, 14, 15], \n    [ 16, 17, 18, 19, 20, 21, 22], \n    [ 23, 24, 25, 26, 27, 28, 29], \n    [ 30, 31,  0,  0,  0,  0,  0]\n  ],\n  \"June\":[\n    [  0,  0,  1,  2,  3,  4,  5],\n    [  6,  7,  8,  9, 10, 11, 12], \n    [ 13, 14, 15, 16, 17, 18, 19], \n    [ 20, 21, 22, 23, 24, 25, 26], \n    [ 27, 28, 29, 30,  0,  0,  0]\n  ],\n  \"July\":[\n    [  0,  0,  0,  0,  1,  2,  3],\n    [  4,  5,  6,  7,  8,  9, 10],\n    [ 11, 12, 13, 14, 15, 16, 17], \n    [ 18, 19, 20, 21, 22, 23, 24], \n    [ 25, 26, 27, 28, 29, 30, 31]\n  ],\n  \"August\":[\n    [  1,  2,  3,  4,  5,  6,  7],\n    [  8,  9, 10, 11, 12, 13, 14], \n    [ 15, 16, 17, 18, 19, 20, 21], \n    [ 22, 23, 24, 25, 26, 27, 28], \n    [ 29, 30, 31,  0,  0,  0,  0]\n  ],\n  \"September\":[\n    [  0,  0,  0,  1,  2,  3,  4],\n    [  5,  6,  7,  8,  9, 10 ,11],\n    [ 12 ,13 ,14 ,15 ,16 ,17 ,18],\n    [ 19 ,20 ,21 ,22 ,23 ,24 ,25],\n    [ 26 ,27 ,28 ,29 ,30,  0,  0]\n  ],\n  \"October\":[\n    [  0,  0,  0,  0,  0,  1,  2],\n    [  3,  4,  5,  6,  7,  8,  9],\n    [ 10, 11, 12, 13, 14, 15, 16], \n    [ 17, 18, 19, 20, 21, 22, 23], \n    [ 24, 25, 26, 27, 28, 29, 30],\n    [ 31,  0,  0,  0,  0,  0,  0]\n  ],\n  \"November\":[\n    [  0,  1,  2,  3,  4,  5,  6],\n    [  7,  8,  9, 10, 11, 12, 13],\n    [ 14, 15, 16, 17, 18, 19, 20],\n    [ 21, 22, 23, 24, 25, 26, 27],\n    [ 28, 29, 30,  0,  0,  0,  0]\n  ],\n  \"December\":[\n    [  0,  0,  0,  1,  2,  3,  4],\n    [  5,  6,  7,  8,  9, 10, 11],\n    [ 12, 13, 14, 15, 16, 17, 18],\n    [ 19, 20, 21, 22, 23, 24, 25],\n    [ 26, 27, 28, 29, 30, 31,  0]\n  ]\n}\n```\n---\n\n## Year /fullyear/\\\u003cyear\\\u003e\n\nReturns the desired year's complete calendar.\n\n```url\nGET https://calendar-json-app.adaptable.app/fullyear/\u003cyear\u003e\n```\n\n*E.G*\n\nEntering the year 2031 as a parameter\n\n```url\nGET https://calendar-json-app.adaptable.app/fullyear/2031\n```\nthe response will be:\n\n```json\n{\n  \"year\": 2031,\n  \"January\":[\n    [  0,  0,  0,  1,  2,  3,  4],\n    [  5,  6,  7,  8,  9, 10, 11],\n    [ 12, 13, 14, 15, 16, 17, 18],\n    [ 19, 20, 21, 22, 23, 24, 25],\n    [ 26, 27, 28, 29, 30, 31,  0]\n    ],\n    \"February\":[\n    [  0,  0,  0,  0,  0,  0,  1],\n    [  2,  3,  4,  5,  6,  7,  8],\n    [  9, 10, 11, 12, 13, 14, 15],\n    [ 16, 17, 18, 19, 20, 21, 22],\n    [ 23, 24, 25, 26, 27, 28,  0],\n    [  0,  0,  0,  0,  0,  0,  0]\n    ],\n    \"March\":[\n    [  0,  0,  0,  0,  0,  0,  1],\n    [  2,  3,  4,  5,  6,  7,  8],\n    [  9, 10, 11, 12, 13, 14, 15],\n    [ 16, 17, 18, 19, 20, 21, 22],\n    [ 23, 24, 25, 26, 27, 28, 29],\n    [ 30, 31,  0,  0,  0,  0,  0]\n    ],\n    \"April\":[\n    [  0,  0,  1,  2,  3,  4,  5],\n    [  6,  7,  8,  9, 10, 11, 12],\n    [ 13, 14, 15, 16, 17, 18, 19],\n    [ 20, 21, 22, 23, 24, 25, 26],\n    [ 27, 28, 29, 30,  0,  0,  0]\n    ],\n    \"May\":[\n    [  0,  0,  0,  0,  1,  2,  3],\n    [  4,  5,  6,  7,  8,  9, 10],\n    [ 11, 12, 13, 14, 15, 16, 17],\n    [ 18, 19, 20, 21, 22, 23, 24],\n    [ 25, 26, 27, 28, 29, 30, 31]\n    ],\n    \"June\":[\n    [  1,  2,  3,  4,  5,  6,  7],\n    [  8,  9, 10, 11, 12, 13, 14],\n    [ 15, 16, 17, 18, 19, 20, 21],\n    [ 22, 23, 24, 25, 26, 27, 28],\n    [ 29, 30,  0,  0,  0,  0,  0]\n    ],\n    \"July\":[\n    [  0,  0,  1,  2,  3,  4,  5],\n    [  6,  7,  8,  9, 10, 11, 12],\n    [ 13, 14, 15, 16, 17, 18, 19],\n    [ 20, 21, 22, 23, 24, 25, 26],\n    [ 27, 28, 29, 30 ,31,  0,  0]\n    ],\n    \"August\":[\n    [  0,  0,  0,  0,  0,  1,  2],\n    [  3,  4,  5,  6,  7,  8,  9],\n    [ 10, 11, 12, 13, 14, 15, 16],\n    [ 17, 18, 19, 20, 21, 22, 23],\n    [ 24, 25, 26, 27, 28, 29, 30],\n    [ 31,  0,  0,  0,  0,  0,  0]\n    ],\n    \"September\":[\n    [  0,  1,  2,  3,  4,  5,  6],\n    [  7,  8,  9, 10, 11, 12, 13],\n    [ 14, 15, 16, 17, 18, 19, 20],\n    [ 21, 22, 23, 24, 25, 26, 27],\n    [ 28, 29, 30,  0,  0,  0,  0]\n    ],\n    \"October\":[\n    [  0,  0,  0,  1,  2,  3,  4],\n    [  5,  6,  7,  8,  9, 10, 11],\n    [ 12, 13, 14, 15, 16, 17, 18],\n    [ 19, 20, 21, 22, 23, 24, 25],\n    [ 26, 27, 28, 29, 30, 31,  0]\n    ],\n    \"November\":[\n    [  0,  0,  0,  0,  0,  0,  1],\n    [  2,  3,  4,  5,  6,  7,  8],\n    [  9, 10, 11, 12, 13, 14, 15],\n    [ 16, 17, 18, 19, 20, 21, 22],\n    [ 23, 24, 25, 26, 27, 28, 29],\n    [ 30,  0,  0,  0,  0,  0,  0]\n    ],\n    \"December\":[\n    [  0,  1,  2,  3,  4,  5,  6],\n    [  7,  8,  9, 10, 11, 12, 13],\n    [ 14, 15, 16, 17, 18, 19, 20],\n    [ 21, 22, 23, 24, 25, 26, 27],\n    [ 28, 29, 30, 31,  0,  0,  0]\n  ]\n}\n```\n---\n\n# Technologies\n\n- Typescript\n- Express\n- Jest\n- Ts node dev\n- Super test\n- Dotenv\n- Http status code\n- Eslint\n- Swagger\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"./assets/icons/typescript.svg\" alt=\"typescript icon\" height=\"70\" width=\"70\"\u003e\n  \u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003cimg src=\"./assets/icons/express.svg\" alt=\"express icon\" height=\"70\" width=\"70\"\u003e\n  \u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003cimg src=\"./assets/icons/jest.svg\" alt=\"jest icon\" height=\"70\" width=\"70\"\u003e\n  \u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003cimg src=\"./assets/icons/tsnode.svg\" alt=\"tsnode icon\" height=\"70\" width=\"70\"\u003e\n  \u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003cimg src=\"./assets/icons/eslint.svg\" alt=\"eslint icon\" height=\"70\" width=\"70\"\u003e\n  \u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003cimg src=\"./assets/icons/swagger.svg\" alt=\"eslint icon\" height=\"70\" width=\"70\"\u003e\n  \u0026nbsp;\u0026nbsp;\u0026nbsp;\n\u003c/div\u003e\n\n---\n\n# Tests\n\nDeveloped integration tests, using jest and supertest, for all endpoints\n\n\u003cimg src=\"./assets/images/getCalendarNow.png\" alt=\"tests results\" width=\"100%\"\u003e\n\u003cimg src=\"./assets/images/getCalendarByMonth.png\" alt=\"tests results\" width=\"100%\"\u003e\n\u003cimg src=\"./assets/images/getCalendarFullYear.png\" alt=\"tests results\" width=\"100%\"\u003e\n\n--- \n\n# Instructions to start tests locally\n\n- run the command `npm test`\n\n---\n\n# Deployment\n\nDeployment on [Adaptable](https://adaptable.io/)\n\n \u003cimg src=\"https://adaptable.io/img/color%20lockup.svg\" alt=\"adaptable icon\" height=\"170\" width=\"170\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgonzagadavid%2Fcalendar-json-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgonzagadavid%2Fcalendar-json-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgonzagadavid%2Fcalendar-json-api/lists"}