Introduction

This is the API documentation the functions which drive this page. It will be written in a style to enable reusage of these functions in your page. I assume that you have running a basic AngularJS web app running and load the libraries defined in /app/js/main.js.

Members

Controllers

The controller must be responsible for binding model data to views using $scope, and control information flow. It does not contain logic to fetch the data or manipulating it.

Members

Controllers.CommentsCtrl

Bundles functions to receive and save comments

Members

CommentsCtrl.getComments()

receive comments

CommentsCtrl.deleteComment(event)

receive comments

Params

CommentsCtrl.submit()

receive comments

Controllers.DocCtrl

xyz

Members

Controllers.KeenioMasterCtrl

xyz

Members

Controllers.WikiquoteCtrl

xyz

Members

Controllers.TableCtrl

xyz

Members

Controllers.GithubModalCtrl

xyz

Members

Controllers.GithubCtrl

As soon as the GithubCtrl is injected it checks if config.heroku.authenticate is in the configuration file config.js . If it is available it will use the oAuth workflow - if not it will ask for Username/Password.

if the owner of the repository login:

Members

GithubCtrl.login()

if no token is available listen for button click…

GithubCtrl.requestCode()

request a oAuth token from Github

GithubCtrl.logout()

Calls GithubAuthService.logout() - this is not really a logout from github, but the access token is deleted

GithubCtrl.UserModel::userLoggedIn()

bind user model to the view and listen for events

GithubCtrl.UserModel::userLoggedOut()

clears logged in user

Controllers.ConfigCtrl

xyz

Members

ConfigCtrl.saveFrontendConfig()

Commit frontend config file back to github

ConfigCtrl.saveBackendConfig()

Commit backend config file to github

Controllers.ToasterController

xyz

Members

ToasterController.pop(toast)

Show popup message

Params

Controllers.GithubForkCtrl

xyz

Members

GithubForkCtrl.checkUnique()

This checks if the repo already exists

GithubForkCtrl.fork()

manages to fork this page

Controllers.AdminCtrl

Unlock admin functionality

Members

Controllers.ExportCtrl

This controller exports/imports post as a zip

Members

ExportCtrl.zip()

zip files

Controllers.ImportCtrl

This controller imports posts from a zip archive

Members

Controllers.GithubEditCtrl

This controller manages edits on content on github

Members

GithubEditCtrl.getTagClass(city)

Set the css style for tags / categories

Params

Controllers.RatingCtrl

Star rating

Members

Routes

The controller must be responsible for binding model data to views using $scope, and control information flow. It does not contain logic to fetch the data or manipulating it. ngSantinize - confirm dialogs

Members

Services

Services are singleton objects used to share data (e.g. among several controllers) and generallyencapsulate reusable pieces of code (since they can be injected and offer their “services” in any part of your app that needs them: controllers, directives, filters, other services etc).

Members

Services.GithubSrvc

xyz

Members

GithubSrvc.renameRepo(forkName)

xyz

Params

GithubSrvc.deleteBranch(forkName, branchName)

With the help of this function the template brach is deleted after forkin

Params

GithubSrvc.getContent(path)

Get content of a file hosted on GitHub

Params

GithubSrvc.editContent(path)

Edit content on a file hosted on github

Params

GithubSrvc.commit(text, path, branch, showMessage, force)

Commit a file back to GitHub

Params

GithubSrvc.commitMany(posts, message, showMessage, force)

Commit many files back to GitHub

Params

GithubSrvc.deleteContent(path)

Delete content from GitHub

Params

Services.UserModel

xyz

Members

Services.UrlSrvc

xyz

Members

UrlSrvc.parseDateTitle(path)

This function extracts date and title from a Jekyll path

Params

Services.PollingSrvc

xyz

Members

Services.YamlSrvc

YamlSrvc can parse files with frontmatter (normal post) and the _config.yaml without frontmatter

Members

Services.EditorSrvc

xyz

Members

Services.PollingImgSrvc

xyz

Members

Services.StyleSwitcher

xyz

Members

event: “githubCommitSuccess”

githubCommitSuccess event

loadDevDoc()

Description

loadApiDoc()

Description

loadUserDoc()

Description

login()

Description

Drop me a line!