Skip to content

Instantly share code, notes, and snippets.

@ottonomy
ottonomy / 20170621-assertion.json
Last active June 26, 2017 19:04
20170621-assertion.json
{
"@context": "https://w3id.org/openbadges/v2",
"id": "https://gist.github.com/ottonomy/30f865699f2047082a4f91f920eb91b4/raw",
"type": "Assertion",
"recipient": {
"type": "email",
"hashed": false,
"identity": "[email protected]"
},
"badge": "https://gist.github.com/ottonomy/f920ce98aa93c2d60b685461f4bd22ca/raw",
@ottonomy
ottonomy / 20170621-badgeclass.json
Last active June 21, 2017 16:54
20170621-badgeclass.json
{
"@context": "https://w3id.org/openbadges/v2",
"id": "https://gist.github.com/ottonomy/f920ce98aa93c2d60b685461f4bd22ca/raw",
"type": "BadgeClass",
"name": "Hosted Bill of Rights",
"description": "Description of Bill",
"image": "https://api.badgr.io/public/badges/bill-of-rights/image",
"criteria": {
"id": "https://api.badgr.io/public/badges/bill-of-rights/criteria",
"narrative": "some narrative"
@ottonomy
ottonomy / 20170621-issuer.json
Last active June 21, 2017 16:57
20170621-issuer.json
{
"@context": "https://w3id.org/openbadges/v2",
"id": "https://gist.github.com/ottonomy/92d945eb61bc820d0954b45fd66836c6/raw",
"type": "Issuer",
"name": "First! American Civics 2016",
"url": "http://concentricsky.com",
"telephone": "+15415551212",
"description": "A test issuer for a hypothetical high school civics course",
"image": "https://api.badgr.io/public/issuers/american-civics-2016/image",
"email": "[email protected]"
@ottonomy
ottonomy / displayer-requirements.md
Last active July 28, 2017 21:43
Open Badges Displayer Requirements for Verification

Proposed Requirement: Must display that the Open Badge is an Open Badge

Requirement: Must enable the viewer to initiate verification of the displayed Open Badge and retrieve up-to-date results about its validity.

Details:

  • Must allow a viewer to access a known verification service with input data in hand.
  • Input data may be in the form of a baked badge image, the assertion URL of a hosted-verification Assertion, or the signed JSON string for a signed-verification Assertion.

Recommended Practice:

  • Make user profile information available to the viewer of the Candidate Platform consistent with the privacy wishes expressed by the user who is recipient of the badge, when relevant.
{
"@context": "https://example.org/contexts/pathways.json",
"@id": "https://example.org/cbu/pathways/korean/basic-korean/elements/basic-korean",
"@type": "PathwayElement",
"targetName": "Basic Korean",
"targetDescription": "Learner demonstrates foundational comprehension of Korean language, including reading, writing, and the essential conversational skills for an extended stay in Korea.",
"alignmentUrl": "https://languages.example.com/korean/basic-knowledge",
"targetCode": null,
"completionBadge": "https://example.org/cbu/badges/korean/basic-korean",
"numberBadgesRequired": 1,
@ottonomy
ottonomy / keybase.md
Created August 18, 2017 18:29
keybase.md

Keybase proof

I hereby claim:

  • I am ottonomy on github.
  • I am ottonomy (https://keybase.io/ottonomy) on keybase.
  • I have a public key ASDTyXWjgypURfgap4S5UUp3QYLXqWAHcNN71FyHthF85Qo

To claim this, I am signing this object:

{
"@context": ["http://purl.imsglobal.org/ctx/caliper/v1p1", "https://w3id.org/openbadges/v2", "https://gist.githubusercontent.com/ottonomy/e04c820dbfacec121c9e8f7dbd45b678/raw/16e33d8d9c75263409d478bfc80e103000d1fd2a/openbadges-profile-context.json"],
"type": "MessageEvent",
"actor": {
"id": "https://api.badgr.io/users/1iHwxOESQ_iOR_zHReMEdQ",
"type": "Profile"
},
"action": "Applied",
"object": {
"id": "http://digitalpromise.ws/applications/abc123",
@ottonomy
ottonomy / recipientProfileContext.json
Last active March 2, 2018 18:17
Draft Recipient Profile Extension
{
"@context": {
"obi": "https://w3id.org/openbadges#",
"extensions": "https://w3id.org/openbadges/extensions#",
"schema": "http://schema.org/",
"name": "schema:name",
"id": "@id"
},
"obi:validation": [
import json
import requests
def add_assertion(access_token, badgeclass_entity_id, data):
import pdb; pdb.set_trace();
headers = {'Authorization': "Bearer " + access_token}
url = "https://api.badgr.io/v2/badgeclasses/{}/assertions".format(badgeclass_entity_id)
response = requests.request('POST', url, headers=headers, timeout=15, json=data)
print response.text
content = json.loads(response.text)
@ottonomy
ottonomy / CourseObject.json
Created February 19, 2019 19:35
CourseObject with alternate identifiers
{
"@context": ["https://tbd.example.com/edplan/v1", {"coci_id": "https://www.cccco.edu/terms/#coci_id"}],
"id": "https://someschool.edu/courses/123",
"name": "Math for Nursing",
"coci_id": "CCC000037611"
}