Add comments for lecturer name feature
This commit is contained in:
parent
4d9bc09ae1
commit
8866e29a44
@ -23,11 +23,13 @@ class CoursesCrawlerController < TissCrawlerController
|
||||
@course = TissCrawler.get_course_details(params)
|
||||
puts @course
|
||||
|
||||
# Get all the org ids into one array
|
||||
@lecturers_oid = @course['lecturers']['oid']
|
||||
@lecturers_names = []
|
||||
|
||||
if @lecturers_oid != nil
|
||||
@lecturers_oid.each do |item|
|
||||
# For each org id get the associated name
|
||||
puts TissCrawler.get_oid_name(item)
|
||||
@lecturers_names << (TissCrawler.get_oid_name(item))
|
||||
end
|
||||
|
||||
@ -41,6 +41,8 @@ class TissCrawler
|
||||
end
|
||||
|
||||
def self.get_oid_name(item)
|
||||
# Fetches a person's name based on the org id
|
||||
# Example: https://tiss.tuwien.ac.at/api/person/v22/oid/250197
|
||||
api = '/api/person/v22/oid/'
|
||||
url = $host + api + item
|
||||
puts(url)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user