Coder Social home page Coder Social logo

lobbyradar's Introduction

Lobbyradar

Cached Data

For high load environments, results may be cached as staic files:

Their use is recommended and may be enforced. Those files are recreated in an interval of 5 minutes.

HTTP API

GET /api/plugin/whitelist

Get domain whitelist for plugin

GET /api/plugin/export

Get entity export for plugin

GET /api/search-fields

Get a list of Search fields and their data types.

POST /api/search or GET /api/search?q={query}

Search entities and relations. When calling this API endpoint a json object query q has to be submitted via POST data or GET parameter:

{
	"collection": "entities",			// which collection to query
	"type": "person",						// which type to query
	"query": [{								// query elements
		"field": "activity.year",		// field
		"operation": "number.equal",	// comparison operator
		"value": 2013						// comparison value
	},{
		"field": "url",
		"operation": "string.match",
		"value": "bundestag.de"
	}]
};

Operators for each data types are:

  • string.match
  • url.match
  • bool.is
  • number.equal
  • number.greater
  • number.lesser
  • number.differs
  • number.between
  • date.equal
  • date.greater
  • date.lesser
  • date.differs
  • date.between

GET /api/autocomplete?q={query}

Fast entity autocompletion search by names and aliases

GET /api/entity/get/{id}?relations=true

Get data for an entity specified by id. Include relations if relations parameter is set.

GET /api/entity/list?letter={letter|}&words={words|}&type={person|entity|} deprecated

List all entities specified by starting letter, containing words and matching type

GET /api/entity/types

List entity types

GET /api/entity/tags

List entity tags

GET /api/entity/export deprecated, use /api/plugin/export instead

Export entities as subset of entities containing entity type, name, aliases and relations in minimalized form.

{
	id: [							// entity id
		type,						// entity type
		[name, alias, ...],	// name and aliases
		[id, ...]				// ids of related entities
	]
}

GET /api/relation/types

List relation types

GET /api/relation/tags

List relation tags

GET /api/relation/list

List all relations

GET /api/route/{entid}/{entid}

Find shortest connection(s) between entities. Result:

{
	"routes": [
		[entid, entid, entid, ...],
		[entid, entid, entid, ...],
		...
	],
	"entities": {
		entid: {
			"name": "<name>", 
			"type":"<type>"
		},
		...
	},
	"relations": {
		relid: {
			"type": type,
			"entities": [entid, entid]
		},
		...
	},
	"map": {
		entid: {
			entid: relid,
			...
		},
		...
	}
}

Data API

See api.md

Data Structure

Entity Object

{
	_id: id,	// mongodb id
	importer: "str", // importer string
	created: (new Date()), // date object
	updated: (new Date()), // date object
	type: "person", // string
	tags: ["tag"], // array of strings
	name: "Name", // string
	slug: "name", // ascii representation of name
	aliases: ["Name", "Alt. Name"], // array of strings
	data: [{
		id: id, // ObjectID()
		key: "address",
		value: {what:ever},
		desc: "Description",
		format: "address", // string, number, address, list, date, ...
		auto: true,
		created: (new Date()), // date object
		updated: (new Date()) // date object
	}],
	search: [
		"name",
		"alt name"
	] // searchable ascii representations of name and aliases
}

Relation

{
	_id: id, // mongodb id
	importer: "str", // importer string
	created: (new Date()), // date object
	updated: (new Date()), // date object
	entities: [id, id], // from, to; mongodb ids
	type: "employee", // string
	tags: ["tag"], // array of strings
	weight: 0, // float, 0..1
	data: [{
		id: id, // ObjectID()
		key: "address",
		value: {what:ever},
		desc: "Description",
		format: "address", // string, number, address, list, date, ...
		auto: true,
		created: (new Date()), // date object
		updated: (new Date()) // date object
	}]
}

lobbyradar's People

Contributors

dependabot[bot] avatar eskimoblood avatar ffalt avatar michaelkreil avatar yetzt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lobbyradar's Issues

Sign Lobbyradar extension so it's not disabled in Firefox 43

Firefox 43 arrived a few days ago. Unsigned extension are now disabled by default. Lobbyradar is thus no longer usable in Firefox.

Since Lobbyradar is no longer supported by the german Öffentlich Rechtliche Zwangsabgabe, I hope you can find new sponsors. This is essential technology and should be further supported by core political institutions.

ZDF, shame on your corrupt leadership!

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.