Extension Lacounts


Extension Basics

Title
Lacounts
Name
ckanext-lacounts
Type
Public extension
Description
CKAN extension for the LA Counts project
CKAN versions
Download-Url (zip)
Last commit
5 years ago (2020-07-13 10:26:21)
Url to repo
Category
Authentication & Security


Background Infos

Description (long)
Show details

ckanext-lacounts

CKAN extension for the LA Counts project

Requirements

This extension is being developed against CKAN 2.8.x

Installation

To install ckanext-lacounts for development, activate your CKAN virtualenv and do::

git clone https://github.com/okfn/ckanext-lacounts.git
cd ckanext-lacounts
python setup.py develop
pip install -r requirements.txt

API (Get Involved page actions)

Actions for the Get Involved page are available in the CKAN Action API.

Event actions:

Available parameters:

  • id: a uuid (required for some actions, see below)
  • name: a string (required)
  • date: a date string e.g. “2019-01-21” (required)
  • free: a boolean-like, e.g. “yes” or true (required)
  • url: a string url
  • location: a string
  • topic_tags: a list of strings, e.g. [“Housing”, “Employment”]

A full example for event_create:

$ curl -X POST http://127.0.0.1:5000/api/3/action/event_create -H "Authorization:{YOUR-API-KEY}" -d '{"name": "My New Event", "free": "yes", "date": "2019-01-21", "url": "http://example.com/event-details", "location": "Downton, Los Angeles", "topic_tags": ["Housing", "Employment"]}'

All Event actions:

“`sh

create a new event (sysadmins only)

curl -X POST http://127.0.0.1:5000/api/3/action/event_create -H “Authorization:{YOUR-API-KEY}” -d ‘{“name”: “My New Event”, “free”: “yes”, “date”: “2019-01-21”}’

update an existing event (sysadmins only)

curl -X POST http://127.0.0.1:5000/api/3/action/event_update -H “Authorization:{YOUR-API-KEY}” -d ‘{“id”: “my-event-id”, “name”: “My Updated Event”, “free”: “no”, “date”: “2020-01-21”}’

delete an event (sysadmins only)

curl -X POST http://127.0.0.1:5000/api/3/action/event_delete -H “Authorization:{YOUR-API-KEY}” -d ‘{“id”: “my-event-id”}’

show an event

curl http://127.0.0.1:5000/api/3/action/event_show -d ‘{“id”: “my-event-id”}’

list events limit and offset are optional.

curl http://127.0.0.1:5000/api/3/action/event_list -H “Autho

Version
0.0.1b5
Version release date
2019-06-11
Contact name
(not set)
Contakt email
(not set)
Contact Url
(not set)


Installation Guide

Configuration hints

To install ckanext-lacounts for development, activate your CKAN virtualenv and do::

git clone https://github.com/okfn/ckanext-lacounts.git
cd ckanext-lacounts
python setup.py develop
pip install -r requirements.txt
Plugins to configure (ckan.ini)
lacounts
CKAN Settings (ckan.ini)
DB migration to be executed
(not set)
<< back to Extensions