ZDenizYStenhaug / swe573-Project

Project repository for SWE573 - Software Development Practice
0 stars 0 forks source link

More information about tags with the Wikipedia API #61

Closed ZDenizYStenhaug closed 2 years ago

ZDenizYStenhaug commented 2 years ago

(contents of this issue is mostly copied from the final exam here The user will be able to tag the services they offer with a string (i.e. Juggling). Users will be able to see similar services based on the tags for a service. Also, a user who views this service will be able to get more information about this service by clicking on a button titled show more information. The additional information will be retrieved by using the the Wikipedia API with endpoint https://en.wikipedia.org/w/api.php. To see an example call to the API for the tag Juggling : https://en.wikipedia.org/w/api.php?format=json&action=query&prop=extracts&exintro&explaintext&redirects=1&titles=Juggling The API returns:

  "batchcomplete": "",
  "query": {
    "pages": {
      "38749": {
        "pageid": 38749,
        "ns": 0,
        "title": "Juggling",
        "extract": "Juggling is a physical skill, performed by a juggler, involving the manipulation of objects for recreation, entertainment, art or sport. The most recognizable form of juggling is toss juggling. Juggling can be the manipulation of one object or many objects at the same time, most often using one or two hands but also possible with feet. Jugglers often refer to the objects they juggle as props. The most common props are balls, clubs, or rings. Some jugglers use more dramatic objects such as knives, fire torches or chainsaws. The term juggling can also commonly refer to other prop-based manipulation skills, such as diabolo, plate spinning, devil sticks, poi, cigar boxes, contact juggling, hooping, yo-yo, and hat manipulation."
      }
    }
  }
}

The contents of the extract field should be displayed when the user clicks on the show more information button. Your code should contruct and make the call.

ZDenizYStenhaug commented 2 years ago

the methods and tests for the backend can be found in this commit :https://github.com/ZeynepDYilmaz/swe573-Project/commit/6b2c971ff3aa6dfe35536497fc5ff61245c6d6bf

ZDenizYStenhaug commented 2 years ago

the neccessary changes to the templates, the new view-tag-info.html file and the associated controller can be found in this commit: https://github.com/ZeynepDYilmaz/swe573-Project/commit/cb26733515434618f9dff6bcaa3e31ea4da91716

ZDenizYStenhaug commented 2 years ago

Will change the name of the method to get-more-info

ZDenizYStenhaug commented 2 years ago

associated commit can be found here: https://github.com/ZeynepDYilmaz/swe573-Project/commit/ed99e1ac333410b15cec1a11347a5b88261b9020