Coder Social home page Coder Social logo

daukantas / solid-libraries Goto Github PK

View Code? Open in Web Editor NEW

This project forked from melvincarvalho/solid-libraries

0.0 2.0 0.0 151 KB

testing solid libraries

Home Page: https://melvincarvalho.github.io/solid-libraries/

License: MIT License

HTML 96.62% JavaScript 3.38%

solid-libraries's Introduction

solid-libraries

testing solid libraries

| rdflib.js | solid-auth-client | solid-web-client | solid-client | solid-ui | solid-panes | solid-utils |

Recipes

Authentication

SolidAuthClient.popupLogin({popupUri: ('https://melvincarvalho.github.io/solid-libraries/popup.html')})

SolidAuthClient.currentSession()

Read files

var file = "https://melvincarvalho.solidtest.space/public/test.ttl"

SolidUtils.fetch(file).then(r => alert(r))

Read RDF

Get RDF and trigger login dialog if neeeded

SolidUtils.rdfFetch("https://retog.solidtest.space/")

SolidUtils.rdfFetch(uri, {}).then(r => alert(r.graph))

Read profile

  SolidAuthClient.currentSession().then(function (session) {
              if (session) {
                  var user = $rdf.sym(session.webId);
                  SolidUtils.rdfFetch(session.webId).then(function (response) {
                      var name = response.graph.any(user, SolidUtils.vocab.foaf('name'));
                      alert("Logged in as: "+name);
                  });
              } else {
                  alert("Not logged in");
              }
          })

List files in a Container

SolidClient.web.get(uri).then( container => console.log(container) )

Create file

SolidAuthClient.fetch( 'https://melvincarvalho.solidtest.space/public/test.ttl', { method : "PUT", body : "<> <> <> ." } )

Create folder

SolidUtils.createLdpc('https://melvincarvalho.solidtest.space/public/', 'pastebin')

Delete files

var file = "https://melvincarvalho.solidtest.space/public/e80a1f20-c498-11e7-b987-c54edbcc67dd.ttl"

SolidUtils.fetch(file, { 'method' : 'DELETE' }).then(r => alert(r))

solid-libraries's People

Contributors

melvincarvalho avatar retog avatar

Watchers

Jurgutis Vytautas Daukantas avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.