Skip to content

acacha/casteaching_package

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Instal·lació

npm install @acacha/casteaching

Usage

Example here

import casteaching from '@acacha/casteaching'

const api = casteaching({baseUrl: 'https://casteaching.alumnedam.me/api'})

// OPTIONAL: for operations that requires token
// Example https://github.com/acacha/casteachingIonic/blob/f8afa6e65e4c5f7c5fde972b85ba95cf347f9c07/src/views/Login.vue#L102
api.setToken(token)

// Obtenir llista de vídeos publicats
api.videos()

// Obtenir vídeo per ID
api.video.show(1)

// Crear video
api.video.create({name: 'PHP 101', description: 'Bla bla bla',  url: 'https://youtube.com/...' })

// Update video
api.video.update(1,{name: 'PHP 101', description: 'Bla bla bla',  url: 'https://youtube.com/...' })

// Destroy
api.video.destroy(1)

Obsolet (previous to 1.0.5)

import casteaching from '@acacha/casteaching'

// Obtenir llista de vídeos publicats
casteaching.videos()

// Obtenir vídeo per ID
casteaching.video.show(1)

// Crear video
casteaching.video.create({name: 'PHP 101', description: 'Bla bla bla',  url: 'https://youtube.com/...' })

// Update video
casteaching.video.update(1,{name: 'PHP 101', description: 'Bla bla bla',  url: 'https://youtube.com/...' })

// Destroy
casteaching.video.destroy(1)

Autor

image

Codi font dels alumnes

Paquet a npmjs

More info

Creació de repositori propi

  • Scoped packages -> Prefix/espai de noms, evitar conflictes de noms -> @acacha/casteaching
  • Moure a un repositori a part
  • Actualitzar README
  • Github submodules

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published