lms-graphql-api 1.2.1 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6d5600bfe4c6aef87566426fb7c58b8014767fdfbbefcce59132ad3f6ab4b86c
4
- data.tar.gz: abe6af9225a2dafdad82813b2f51377429471c10754426e7a3daaf48f6d408ec
3
+ metadata.gz: 3a58ae9ee707b6d878e454edb4a68c965ce858c48ae0e3c262bb5ecf4e131853
4
+ data.tar.gz: 95198edf2ed4b0ba3b5dd255a243efdba923de6dad543c44bd3f90255d166cc4
5
5
  SHA512:
6
- metadata.gz: cc847c445dd28cd8051b1a808e67ea97d94efdae51e1c1eb9f8780eff2d22ef4261e451543d4ec6e7e8ba5dd417c00feb38a5ab18d48d197ed1a3ab7900548c8
7
- data.tar.gz: fc7ba8330fd0303ef6abfbc11277cb0ac10b760ba2e11886681a9e10c64bdea082797e71b833799c16fb1a4f91e3f64f99f9f40596eff0457e20674aad295a08
6
+ metadata.gz: 520f0a04ed182af8fd4efdea4c8416f7731027e0b4785c7af07abee26533aba5eb9777a817451383a92ffb05bd4a2b079f9e144f530d5fa33682183d87491a87
7
+ data.tar.gz: fc5af6de6a628fc675cfb574f29a4d2717571b1cfde0e5743c70a661add50ba8d36cf4cc7df4f25e2d38084563827e1c40b96e68831d017bd5186ea0b0ffd22a
@@ -10,9 +10,9 @@ module LMSGraphQL
10
10
  argument :resourceId, String, required: false
11
11
  argument :tag, String, required: false
12
12
  argument :resourceLinkId, String, required: false
13
- argument :https://canvas.instructure.com/lti/submission_type, String, required: false
13
+ argument :submission_type, String, required: false
14
14
  field :line_item, LMSGraphQL::Types::Canvas::CanvasLineItem, null: false
15
- def resolve(course_id:, scoreMaximum:, label:, resourceId: nil, tag: nil, resourceLinkId: nil, https://canvas.instructure.com/lti/submission_type: nil)
15
+ def resolve(course_id:, scoreMaximum:, label:, resourceId: nil, tag: nil, resourceLinkId: nil, submission_type: nil)
16
16
  context[:canvas_api].call("CREATE_LINE_ITEM").proxy(
17
17
  "CREATE_LINE_ITEM",
18
18
  {
@@ -24,7 +24,7 @@ module LMSGraphQL
24
24
  "resourceId": resourceId,
25
25
  "tag": tag,
26
26
  "resourceLinkId": resourceLinkId,
27
- "https://canvas.instructure.com/lti/submission_type": https://canvas.instructure.com/lti/submission_type
27
+ "https://canvas.instructure.com/lti/submission_type": submission_type
28
28
  },
29
29
  ).parsed_response
30
30
  end
@@ -1,5 +1,5 @@
1
1
  require_relative "../canvas_base_mutation"
2
- require_relative "../../types/canvas/canvasresult_url string the url to the result that was created."
2
+
3
3
  module LMSGraphQL
4
4
  module Mutations
5
5
  module Canvas
@@ -13,9 +13,9 @@ module LMSGraphQL
13
13
  argument :scoreGiven, Float, required: false
14
14
  argument :scoreMaximum, Float, required: false
15
15
  argument :comment, String, required: false
16
- argument :https://canvas.instructure.com/lti/submission, String, required: false
17
- field :canvasresult_url string the url to the result that was created., [LMSGraphQL::Types::Canvas::CanvasresultUrl String The url to the result that was created.], null: false
18
- def resolve(course_id:, line_item_id:, userId:, activityProgress:, gradingProgress:, timestamp:, scoreGiven: nil, scoreMaximum: nil, comment: nil, https://canvas.instructure.com/lti/submission: nil)
16
+ argument :submission, String, required: false
17
+ field :return_value, String, null: false
18
+ def resolve(course_id:, line_item_id:, userId:, activityProgress:, gradingProgress:, timestamp:, scoreGiven: nil, scoreMaximum: nil, comment: nil, submission: nil)
19
19
  context[:canvas_api].call("CREATE_SCORE").proxy(
20
20
  "CREATE_SCORE",
21
21
  {
@@ -30,7 +30,7 @@ module LMSGraphQL
30
30
  "scoreGiven": scoreGiven,
31
31
  "scoreMaximum": scoreMaximum,
32
32
  "comment": comment,
33
- "https://canvas.instructure.com/lti/submission": https://canvas.instructure.com/lti/submission
33
+ "https://canvas.instructure.com/lti/submission": submission
34
34
  },
35
35
  ).parsed_response
36
36
  end
@@ -1,12 +1,12 @@
1
1
  require_relative "../canvas_base_mutation"
2
- require_relative "../../types/canvas/media_trackk"
2
+ require_relative "../../types/canvas/media_track"
3
3
  module LMSGraphQL
4
4
  module Mutations
5
5
  module Canvas
6
6
  class UpdateMediaTrack < BaseMutation
7
7
  argument :media_object_id, ID, required: true
8
8
  argument :include, String, required: false
9
- field :media_trackk, [LMSGraphQL::Types::Canvas::CanvasMediaTrackk], null: false
9
+ field :media_track, [LMSGraphQL::Types::Canvas::CanvasMediaTrack], null: false
10
10
  def resolve(media_object_id:, include: nil)
11
11
  context[:canvas_api].call("UPDATE_MEDIA_TRACKS").proxy(
12
12
  "UPDATE_MEDIA_TRACKS",
@@ -1,10 +1,10 @@
1
1
  require_relative "../canvas_base_resolver"
2
- require_relative "../../types/canvas/canvas{ "unread_count": "integer" }"
2
+
3
3
  module LMSGraphQL
4
4
  module Resolvers
5
5
  module Canvas
6
6
  class GetUnreadSharesCount < CanvasBaseResolver
7
- type LMSGraphQL::Types::Canvas::Canvas{ "unread_count": "integer" }, null: false
7
+ type Int, null: false
8
8
  argument :user_id, ID, required: true
9
9
  def resolve(user_id:, get_all: false)
10
10
  result = context[:canvas_api].call("GET_UNREAD_SHARES_COUNT").proxy(
@@ -1,10 +1,10 @@
1
1
  require_relative "../canvas_base_resolver"
2
- require_relative "../../types/canvas/canvaslist of content item"
2
+
3
3
  module LMSGraphQL
4
4
  module Resolvers
5
5
  module Canvas
6
6
  class ListItemsForSelectiveImportAccount < CanvasBaseResolver
7
- type LMSGraphQL::Types::Canvas::Canvaslist of content item, null: false
7
+ type [String], null: false
8
8
  argument :account_id, ID, required: true
9
9
  argument :id, ID, required: true
10
10
  argument :type, String, required: false
@@ -1,10 +1,10 @@
1
1
  require_relative "../canvas_base_resolver"
2
- require_relative "../../types/canvas/canvaslist of content item"
2
+
3
3
  module LMSGraphQL
4
4
  module Resolvers
5
5
  module Canvas
6
6
  class ListItemsForSelectiveImportCourse < CanvasBaseResolver
7
- type LMSGraphQL::Types::Canvas::Canvaslist of content item, null: false
7
+ type [String], null: false
8
8
  argument :course_id, ID, required: true
9
9
  argument :id, ID, required: true
10
10
  argument :type, String, required: false
@@ -1,10 +1,10 @@
1
1
  require_relative "../canvas_base_resolver"
2
- require_relative "../../types/canvas/canvaslist of content item"
2
+
3
3
  module LMSGraphQL
4
4
  module Resolvers
5
5
  module Canvas
6
6
  class ListItemsForSelectiveImportGroup < CanvasBaseResolver
7
- type LMSGraphQL::Types::Canvas::Canvaslist of content item, null: false
7
+ type [String], null: false
8
8
  argument :group_id, ID, required: true
9
9
  argument :id, ID, required: true
10
10
  argument :type, String, required: false
@@ -1,10 +1,10 @@
1
1
  require_relative "../canvas_base_resolver"
2
- require_relative "../../types/canvas/canvaslist of content item"
2
+
3
3
  module LMSGraphQL
4
4
  module Resolvers
5
5
  module Canvas
6
6
  class ListItemsForSelectiveImportUser < CanvasBaseResolver
7
- type LMSGraphQL::Types::Canvas::Canvaslist of content item, null: false
7
+ type [String], null: false
8
8
  argument :user_id, ID, required: true
9
9
  argument :id, ID, required: true
10
10
  argument :type, String, required: false
@@ -6,15 +6,15 @@ module LMSGraphQL
6
6
  class NamesAndRoleListGroupMembership < CanvasBaseResolver
7
7
  type LMSGraphQL::Types::Canvas::CanvasNamesAndRoleMembership, null: false
8
8
  argument :group_id, ID, required: true
9
- argument :`rlid`, String, required: false
9
+ argument :rlid, String, required: false
10
10
  argument :role, String, required: false
11
11
  argument :limit, String, required: false
12
- def resolve(group_id:, `rlid`: nil, role: nil, limit: nil, get_all: false)
12
+ def resolve(group_id:, rlid: nil, role: nil, limit: nil, get_all: false)
13
13
  result = context[:canvas_api].call("NAMES_AND_ROLE_LIST_GROUP_MEMBERSHIPS").proxy(
14
14
  "NAMES_AND_ROLE_LIST_GROUP_MEMBERSHIPS",
15
15
  {
16
16
  "group_id": group_id,
17
- "`rlid`": `rlid`,
17
+ "`rlid`": rlid,
18
18
  "role": role,
19
19
  "limit": limit },
20
20
  nil,
@@ -12,7 +12,7 @@ module LMSGraphQL
12
12
  field :tag, String, "Tag used to qualify a line Item beyond its ids.Example: 50", null: true
13
13
  field :resource_id, String, "A Tool Provider specified id for the Line Item. Multiple line items can share the same resourceId within a given context.Example: 50", null: true
14
14
  field :resource_link_id, String, "The resource link id the Line Item is attached to.Example: 50", null: true
15
- field :https://canvas.instructure.com/lti/submission_type, String, "The extension that defines the submission_type of the line_item. Only returns if set through the line_item create endpoint..Example: { 'type':'external_tool', 'external_tool_url':'https://my.launch.url', }", null: true
15
+ field :submission_type, String, "The extension that defines the submission_type of the line_item. Only returns if set through the line_item create endpoint..Example: { 'type':'external_tool', 'external_tool_url':'https://my.launch.url', }", null: true
16
16
 
17
17
  end
18
18
  end
@@ -12,7 +12,7 @@ module LMSGraphQL
12
12
  argument :tag, String, "Tag used to qualify a line Item beyond its ids.Example: 50", required: false
13
13
  argument :resource_id, String, "A Tool Provider specified id for the Line Item. Multiple line items can share the same resourceId within a given context.Example: 50", required: false
14
14
  argument :resource_link_id, String, "The resource link id the Line Item is attached to.Example: 50", required: false
15
- argument :https://canvas.instructure.com/lti/submission_type, String, "The extension that defines the submission_type of the line_item. Only returns if set through the line_item create endpoint..Example: { 'type':'external_tool', 'external_tool_url':'https://my.launch.url', }", required: false
15
+ argument :submission_type, String, "The extension that defines the submission_type of the line_item. Only returns if set through the line_item create endpoint..Example: { 'type':'external_tool', 'external_tool_url':'https://my.launch.url', }", required: false
16
16
 
17
17
  end
18
18
  end
@@ -6,11 +6,11 @@ module LMSGraphQL
6
6
  module Canvas
7
7
  class CanvasNamesAndRoleMessage < BaseType
8
8
  description "Names and Role. API Docs: https://canvas.instructure.com/doc/api/names_and_role.html"
9
- field :https://purl.imsglobal.org/spec/lti/claim/message_type, String, "The type of LTI message being described. Always set to 'LtiResourceLinkRequest'.Example: LtiResourceLinkRequest", null: true
9
+ field :message_type, String, "The type of LTI message being described. Always set to 'LtiResourceLinkRequest'.Example: LtiResourceLinkRequest", null: true
10
10
  field :locale, String, "The member's preferred locale.Example: en", null: true
11
- field :https://www.instructure.com/canvas_user_id, ID, "The member's API ID.Example: 1", null: true
12
- field :https://www.instructure.com/canvas_user_login_id, ID, "The member's primary login username.Example: showell@school.edu", null: true
13
- field :https://purl.imsglobal.org/spec/lti/claim/custom, String, "Expanded LTI custom parameters that pertain to the member (as opposed to the Context).Example: en, America/Denver", null: true
11
+ field :canvas_user_id, ID, "The member's API ID.Example: 1", null: true
12
+ field :canvas_user_login_id, ID, "The member's primary login username.Example: showell@school.edu", null: true
13
+ field :custom, String, "Expanded LTI custom parameters that pertain to the member (as opposed to the Context).Example: en, America/Denver", null: true
14
14
 
15
15
  end
16
16
  end
@@ -6,11 +6,11 @@ module LMSGraphQL
6
6
  module Canvas
7
7
  class CanvasNamesAndRoleMessageInput < BaseInputObject
8
8
  description "Names and Role. API Docs: https://canvas.instructure.com/doc/api/names_and_role.html"
9
- argument :https://purl.imsglobal.org/spec/lti/claim/message_type, String, "The type of LTI message being described. Always set to 'LtiResourceLinkRequest'.Example: LtiResourceLinkRequest", required: false
9
+ argument :message_type, String, "The type of LTI message being described. Always set to 'LtiResourceLinkRequest'.Example: LtiResourceLinkRequest", required: false
10
10
  argument :locale, String, "The member's preferred locale.Example: en", required: false
11
- argument :https://www.instructure.com/canvas_user_id, ID, "The member's API ID.Example: 1", required: false
12
- argument :https://www.instructure.com/canvas_user_login_id, ID, "The member's primary login username.Example: showell@school.edu", required: false
13
- argument :https://purl.imsglobal.org/spec/lti/claim/custom, String, "Expanded LTI custom parameters that pertain to the member (as opposed to the Context).Example: en, America/Denver", required: false
11
+ argument :canvas_user_id, ID, "The member's API ID.Example: 1", required: false
12
+ argument :canvas_user_login_id, ID, "The member's primary login username.Example: showell@school.edu", required: false
13
+ argument :custom, String, "Expanded LTI custom parameters that pertain to the member (as opposed to the Context).Example: en, America/Denver", required: false
14
14
 
15
15
  end
16
16
  end
@@ -9,6 +9,7 @@ module LMSGraphQL
9
9
  # HACK. UpdateStudentQuestionScoresAndComment requires CanvasHashInput which is not currently defined
10
10
  # If we want to use that endpoint we'll have to manually defined the object here.
11
11
  class CanvasHashInput < BaseInputObject
12
+ argument :id, ID, "The ID", required: true
12
13
  end
13
14
  end
14
15
  end
@@ -1,3 +1,3 @@
1
1
  module LMSGraphQL
2
- VERSION = "1.2.1".freeze
2
+ VERSION = "1.3.0".freeze
3
3
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lms-graphql-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Atomic Jolt
8
8
  - Justin Ball
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-07-14 00:00:00.000000000 Z
12
+ date: 2020-07-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: graphql
@@ -1317,7 +1317,7 @@ homepage: https://github.com/atomicjolt/lms_graphql_api
1317
1317
  licenses:
1318
1318
  - MIT
1319
1319
  metadata: {}
1320
- post_install_message:
1320
+ post_install_message:
1321
1321
  rdoc_options: []
1322
1322
  require_paths:
1323
1323
  - lib
@@ -1333,7 +1333,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1333
1333
  version: '0'
1334
1334
  requirements: []
1335
1335
  rubygems_version: 3.1.4
1336
- signing_key:
1336
+ signing_key:
1337
1337
  specification_version: 4
1338
1338
  summary: GraphQL wrapper for the Instructure Canvas API
1339
1339
  test_files: []