Class: Coursera::CourseraApi

Inherits:
Object
  • Object
show all
Defined in:
lib/share_learning/coursera_api.rb

Overview

This class is in charge of the work involving using Coursera API

Constant Summary collapse

COURSERA_CATOLOG_API_URL =
'https://api.coursera.org/api/courses.v1'.freeze
'https://www.coursera.org/learn/'.freeze
BATCH_SIZE =
100

Class Method Summary collapse

Class Method Details

.coursesObject



15
16
17
18
# File 'lib/share_learning/coursera_api.rb', line 15

def self.courses
  return @courses if @courses
  @courses = retrieve_all_courses
end

.total_course_numObject



11
12
13
# File 'lib/share_learning/coursera_api.rb', line 11

def self.total_course_num
  @total_course_num = retrieve_total_course_num
end