代写CMPUT 401: Assignment Winter 2025代写Java程序

CMPUT 401: Assignment

Winter 2025

The goal of this assignment is to get you acquainted with the technical aspects of the web app development process. In this assignment, you will build a simple REST API and deploy it to a Cybera Rapid Access Cloud instance. This assignment will also get you acquainted with GitHub basics. You are free to choose any programming language, and use any frameworks, packages, modules, libraries, and any database management system.

GitHub

GitHub Classroom assignment invitation link:https://classroom.github.com/a/j92ybbve

•    Click the link above to create a repository that you will use for this assignment.

•    You will create an issue titled “News API” .

•    You must work off a branch and merge your branch into the “main” branch with a pull request.

•    You must merge the pull request you created into your “main” branch with a phrase that closes the issue you created. DO NOT delete the first branch after merging the pull request and closing the issue.

•    This GitHub repository shouldn’t have anymore commits after the deadline of the assignment.

•    Naming conventions are an important point specially when working in teams, make sure to choose and follow a specific convention for your commit messages, branch names, and other names. Usually in different companies, the convention is already defined or when working in teams a specific convention is agreed upon. For your personal use make sure to check out different conventions before choosing one. Using a unified convention makes your GitHub page look more professional.

Endpoints

Get the current top headlines for Canada

•    For this assignment we are going to use thiswebsiteto get updated news.

•    Please Sign up to the website, you will get a free API key right away.

•    Please don’t input the data manually, your code should do that for you!

•    Store the first 20 news articles for Canada on Jan 1st  2025.

•    Update: You can use this link as there were some questions about other formats.

•    Although the sample response has the following fields, do not save them all (delete url and

urltoimage). When added to the dataset each one of the articles should be assigned a unique ID (this is different from the source id field just leave that as it is) that will be used in other API

calls. Do not save url and urlToImage.

{

"status": "ok",

"totalResults": 1,

"articles": [

{

"source": {

"id": null,

"name": "Contemporist.com" },

"author": "Erin",

"title": "A Dark Brick Exterior For A Home Surrounded By Trees",

"description": "Scott Posno Design has shared photos of a modern home they recently completed in

Vancouver, Canada, that showcases a dark brick exterior.",

"url": "https://www.contemporist.com/a-dark-brick-exterior-for-a-home-surrounded-by-trees/",

"urlToImage": "https://www.contemporist.com/wp-content/uploads/2024/10/modern-house-dark-brick- exterior-181024-1108-01a.jpg",

"publishedAt": "2025-01-01T16:57:10Z",

"content": "Scott Posno Design has shared photos of a modern home they completed in Vancouver, Canada, that showcases a dark brick exterior.\r\nThe house presents a series of stacked, dark brick volumes that create … [+1297 chars]"

} ]

}

Get News List

http://[ipv6 address]/news (GET)

{

"status": "ok",

"totalResults": 20, "articles": [

{

"id": 1, {

"source": { "id": null,

"name": "Contemporist.com" },

"author": "Erin",

"title": "A Dark Brick Exterior For A Home Surrounded By Trees",

"description": "Scott Posno Design has shared photos of a modern home they recently completed in Vancouver, Canada, that showcases a dark brick exterior.",

"publishedAt": "2025-01-01T16:57:10Z",

"content": "Scott Posno Design has shared photos of a modern home they completed in Vancouver, Canada,that showcases a dark brick exterior.\r\nThe house presents a series of stacked, dark brick

volumes that creat … [+1297 chars]"

}, {

"id": 2,

{

"source": { "id": null,

"name": "Forbes"

},

"author": "Jon McGowan, Contributor, \n Jon McGowan, Contributor\n https://www.forbes.com/sites/jonmcgowan/",

"title": "Canada Seeks Input On New Greenwashing Law That Will Impact US Businesses",   "description": "The Canadian Competition Bureau has released a draft of proposed guidelines

regulating environmental claims in marketing and is seeking feedback from impacted businesses.", "publishedAt": "2025-01-01T00:17:29Z",

"content": "Canadian flag flutters against a blue sky in Richmond Hill, Ontario Canada, on February 11, 2023. ... [+] (Photo by Creative Touch Imaging Ltd./NurPhoto via Getty

Images)\r\nNurPhoto via Getty Images\r\n … [+4671 chars]"

}  ]   }

Update News

http://[ipv6 address]/news/{id} (PUT)

Sample request structure (all fields must be supplied):

{

"source": { "id": null,

"name": "Bringatrailer.com" },

"author": "bringatrailer",

"title": "2007 Porsche 911 GT3",

"description": "This 2007 Porsche 911 GT3 spent time in California prior to being exported to Japan, and it was imported to Canada in 2024. Finished in black over black leather and Alcantara upholstery, it is powered by a 3.6-liter flat-six linked with a six-speed manual tra…",

"publishedAt": "2025-01-01T19:40:14Z",

"content": "This 2007 Porsche 911 GT3 spent time in California prior to being exported to Japan,

and it was imported to Canada in 2024. Finished in black over black leather and Alcantara upholstery, it is powere [+2914 chars]"

}

Successful Response structure:

{

"status": 200,

"message": "News Updated" }

Modify News

http://[ipv6 address]/news/{id} (PATCH)

Sample request structure (any fields of the PUT method can be supplied):

{

"author": "bringatrailer"

}

Successful Response structure:

{

"status": 200,

"message": "News Modified" }

Delete News

http://[ipv6 address]/status/{id} (DELETE)

Successful Response structure:

{

"status": 200,

"message": "News Deleted" }

If you delete a few of the articles it is fine and you do not need to get them again, you can do that api call once and store the top 20 and delete some of it for test.

API Documentation

•    Use your framework/library of choice to auto-generate API documentation using the OpenAPI standard.

•    The API documentation must be available at http://[ipv6 address]/docs.

•    The API documentation must be valid OpenAPI Spec.

Deployment

•    The system must be deployed on your personal Cybera RAC instance (not the instance you have for your group project).

•    Many web frameworks include some kind of development server that you can use to run your app

during development quickly. For example, in Django, you can easily run your app using python manage.pyrunserver

•    Do NOT use a development server for deployment (e.g., if you useDjango REST Framework,   you can not run it on your server using the command above). This way is great for development purposes, but it is a horrible idea to do it in production for several reasons:

1.   It is not secure

2.   It cannot handle multiple requests well (i.e., it's VERY slow)

3.   You would need to manually restart your server if something happens (your operating system can't take care of this)

•    You need to deploy your API. There are many ways to do it, and it depends on the framework you choose. Use a web server like Nginx, or Apache. You should find a tutorial for your

framework.

Your server must be listening on port 8080.

Deliverables

We are using GitHub Classroom for this assignment. You must have your code in the GitHub repository associated with the assignment.

Mandatory Files

In addition to your code, you must create four files (pay attention to file text-case and spelling) in your root directory.

1. cybera.txt, containing the IPv6 address of your personal Cybera instance with the deployed API. NOTE THAT THERE IS NO HTTP(S), it is purely the IPV6 address. Don’t include anything else in this file.

Example of the text file contents:

2001:0db8:85a3:0000:0000:8a2e:0370:7334

2. README.md, containing brief information about the framework, programming language, and DBMS that you used, each on a separate line (there should be 3 lines, don’t include

anything else in this file):

Framework Language    DBMS

Example of README.md:

Rocket Rust

MongoDB

3. LICENSE, containing an appropriate license for your code. Refer to these instructions:

https://help.github.com/articles/adding-a-license-to-a-repository/

4. REFERENCES.md which contains links and text of the resources you used to build your project. The format should be a “*” for each reference point.

Example of REFERENCES.md:

* https://stackoverflow.com

* I prompted ChatGPT to ask how do I open a GitHub issue”

Marking Scheme

20 Marks Total

●     Having correct APIs (will include test cases later on eclass and announce it). (6 Marks)

●    Auto-generated API documentation accessible from http://[ipv6 address]/docs (2 Marks)

○    The source of the OpenAPI docs is accessible from is http://[ipv6 address]/api- spec.yaml andis valid OpenAPI Spec (1 Mark)

●    Able to access Cybera server (3 Marks), if you haven’t deployed, we do not have anyway to access your cybera. Please include a screenshot of your cybera dashboard and instance.

●    Application is deployed on a web server such as Apache or Nginx (2 Marks)

●    Merge the pull request you created into your “main” branch with a phrase that closes the issue you created (1 Mark)

●    Using a unified naming convention for branch names and commits. (1 Mark)

●    Create a README.md in the main branch according to specifications (1 Mark)

●    Create a cybera.txt according to the specifications (1 Mark)

●    Create an MIT or Apache 2.0 license file according to these instructions:

https://help.github.com/articles/adding-a-license-to-a-repository/(1 Mark)

●    Create a REFERENCES.md according to the specifications (1 Mark)s

Important note: if you haven’t deployed we might need you to do a 3-5 minute demo of your assignment at the end of the labs, or based on a time that will be announced.

After releasing the scores, you will have 1 week to arrange a meeting with the TA to discuss your score. Academic Integrity

This is an individual assignment. Please do not share your work with your classmates. We may use a plagiarism detection system to check for plagiarism.

You may (and should!) use online tutorials, Stack Overflow posts and other publicly available resources.

You may (and should!) use AI tools like GitHub Copilot or Amazon CodeWhisperer. However, you should cite your sources in REFERENCES.md.

Frameworks to Consider

Here are some suggestions if you're unsure which framework to use.

● Django REST Framework(Python)

● FastAPI(Python)

● Flask RESTful(Python)

● Express(Node.js / JavaScript)

● Laravel(PHP)

● ASP.NET Web API(C#)

● Spring and Hibernate(Java)

● Rocket(Rust)

● Rails(Ruby)

● Gin(Golang)

DBMS to Consider

●    SQLite (SQL)

●    MySQL / MariaDB (SQL)

●    PostgreSQL (SQL)

●    MongoDB (NoSQL)


热门主题

课程名

mktg2509 csci 2600 38170 lng302 csse3010 phas3226 77938 arch1162 engn4536/engn6536 acx5903 comp151101 phl245 cse12 comp9312 stat3016/6016 phas0038 comp2140 6qqmb312 xjco3011 rest0005 ematm0051 5qqmn219 lubs5062m eee8155 cege0100 eap033 artd1109 mat246 etc3430 ecmm462 mis102 inft6800 ddes9903 comp6521 comp9517 comp3331/9331 comp4337 comp6008 comp9414 bu.231.790.81 man00150m csb352h math1041 eengm4100 isys1002 08 6057cem mktg3504 mthm036 mtrx1701 mth3241 eeee3086 cmp-7038b cmp-7000a ints4010 econ2151 infs5710 fins5516 fin3309 fins5510 gsoe9340 math2007 math2036 soee5010 mark3088 infs3605 elec9714 comp2271 ma214 comp2211 infs3604 600426 sit254 acct3091 bbt405 msin0116 com107/com113 mark5826 sit120 comp9021 eco2101 eeen40700 cs253 ece3114 ecmm447 chns3000 math377 itd102 comp9444 comp(2041|9044) econ0060 econ7230 mgt001371 ecs-323 cs6250 mgdi60012 mdia2012 comm221001 comm5000 ma1008 engl642 econ241 com333 math367 mis201 nbs-7041x meek16104 econ2003 comm1190 mbas902 comp-1027 dpst1091 comp7315 eppd1033 m06 ee3025 msci231 bb113/bbs1063 fc709 comp3425 comp9417 econ42915 cb9101 math1102e chme0017 fc307 mkt60104 5522usst litr1-uc6201.200 ee1102 cosc2803 math39512 omp9727 int2067/int5051 bsb151 mgt253 fc021 babs2202 mis2002s phya21 18-213 cege0012 mdia1002 math38032 mech5125 07 cisc102 mgx3110 cs240 11175 fin3020s eco3420 ictten622 comp9727 cpt111 de114102d mgm320h5s bafi1019 math21112 efim20036 mn-3503 fins5568 110.807 bcpm000028 info6030 bma0092 bcpm0054 math20212 ce335 cs365 cenv6141 ftec5580 math2010 ec3450 comm1170 ecmt1010 csci-ua.0480-003 econ12-200 ib3960 ectb60h3f cs247—assignment tk3163 ics3u ib3j80 comp20008 comp9334 eppd1063 acct2343 cct109 isys1055/3412 math350-real math2014 eec180 stat141b econ2101 msinm014/msing014/msing014b fit2004 comp643 bu1002 cm2030
联系我们
EMail: 99515681@qq.com
QQ: 99515681
留学生作业帮-留学生的知心伴侣!
工作时间:08:00-21:00
python代写
微信客服:codinghelp
站长地图