Module: Quizlet::Sets

Included in:
Client
Defined in:
lib/quizlet/sets.rb

Instance Method Summary collapse

Instance Method Details

#add_set(params) ⇒ Object

Params requires terms[], definitions[], lang_terms, lang_definitions



33
34
35
# File 'lib/quizlet/sets.rb', line 33

def add_set(params)
  post('sets', params)
end

#add_term_to_set_by_id(id, params) ⇒ Object



45
46
47
# File 'lib/quizlet/sets.rb', line 45

def add_term_to_set_by_id(id, params)
  post('sets/' + id.to_s + '/terms', params)
end

#delete_set_by_id(id) ⇒ Object



41
42
43
# File 'lib/quizlet/sets.rb', line 41

def delete_set_by_id(id)
  delete('sets/' + id.to_s, {})
end

#delete_term_in_set_by_id(set_id, term_id) ⇒ Object



53
54
55
# File 'lib/quizlet/sets.rb', line 53

def delete_term_in_set_by_id(set_id, term_id)
  delete('sets/' + set_id.to_s + '/terms/' + term_id.to_s, {})
end

#edit_set_by_id(id, params) ⇒ Object



37
38
39
# File 'lib/quizlet/sets.rb', line 37

def edit_set_by_id(id, params)
  put('sets/' + id.to_s, params)
end

#edit_term_in_set_by_id(set_id, term_id, params) ⇒ Object



49
50
51
# File 'lib/quizlet/sets.rb', line 49

def edit_term_in_set_by_id(set_id, term_id, params)
  put('sets/' + set_id.to_s + '/terms/' + term_id.to_s, params)
end

#get_favorite_sets_by_user_id(user_id) ⇒ Object



28
29
30
# File 'lib/quizlet/sets.rb', line 28

def get_favorite_sets_by_user_id(user_id)
  get('users/' + user_id.to_s + '/favorites', {})
end

#get_set_by_id(id) ⇒ Object



8
9
10
# File 'lib/quizlet/sets.rb', line 8

def get_set_by_id(id)
  get('sets/' + id.to_s, {})
end

#get_set_password_by_id(id) ⇒ Object



16
17
18
# File 'lib/quizlet/sets.rb', line 16

def get_set_password_by_id(id)
  get('sets/' + id.to_s + '/password', {})
end

#get_set_terms_by_id(id) ⇒ Object



12
13
14
# File 'lib/quizlet/sets.rb', line 12

def get_set_terms_by_id(id)
  get('sets/' + id.to_s + '/terms', {})
end

#get_setsObject

This actually doesn’t look supported



4
5
6
# File 'lib/quizlet/sets.rb', line 4

def get_sets
  get('sets', {})
end

#get_sets_by_class_id(class_id) ⇒ Object



20
21
22
# File 'lib/quizlet/sets.rb', line 20

def get_sets_by_class_id(class_id)
  get('classes/' + class_id.to_s + '/sets', {})
end

#get_sets_by_user_id(user_id) ⇒ Object



24
25
26
# File 'lib/quizlet/sets.rb', line 24

def get_sets_by_user_id(user_id)
  get('users/' + user_id.to_s + '/sets', {})
end