The Events API allows you to retreive event information for given context.
Returns a list of events.
Parameters
Property | Type | Required | Example |
---|---|---|---|
pageNumber | number | 1 |
Usage
const events = await Xedi.Events.list();
Response
{"current_page": 1,"data": [{"_id": "94fb96b4-bba4-11ea-b267-0242ac140008","translation_key": "events.user.modified.self","translation_params": {"field": {"translation_key": "user.fields.first_name"},"from": "Anthony","to": "Tony"},"context_id": "92ac7274-9369-11ea-9521-01002da17977","actor_id": "92ac7274-9369-11ea-9521-01002da17977","updated_at": "2020-07-01 15:10:13","created_at": "2020-07-01 15:10:13"},{"_id": "4a1d2cca-bba9-11ea-8d7c-0100bc2a1e29","translation_key": "events.business.joined","translation_params": {"user": {"_id": "c0575730-bba9-11ea-8da8-01002da17977"}},"context_id": "2ff01e20-bba9-11ea-8f25-0100f1a50c6e","actor_id": "39868f46-bba9-11ea-9f87-01002da17977","updated_at": "2020-07-01 15:10:13","created_at": "2020-07-01 15:10:13"}],"first_page_url": "https://api.xedi.com/1/events?page=1","from": 1,"last_page": 1,"last_page_url": "https://api.xedi.com/1/events?page=1","next_page_url": null,"path": "https://api.xedi.com/1/events","per_page": 15,"prev_page_url": null,"to": 1,"total": 2}
Retrieves a given event by ID
Parameters
Property | Type | Required | Example |
---|---|---|---|
userID | XUID | 94fb96b4-bba4-11ea-b267-0242ac140008 |
Usage
const event = await Xedi.Events.get('94fb96b4-bba4-11ea-b267-0242ac140008');
Response
{"_id": "94fb96b4-bba4-11ea-b267-0242ac140008","translation_key": "events.user.modified.self","translation_params": {"field": {"translation_key": "user.fields.first_name"},"from": "Anthony","to": "Tony"},"context_id": "92ac7274-9369-11ea-9521-01002da17977","actor_id": "92ac7274-9369-11ea-9521-01002da17977","updated_at": "2020-07-01 15:10:13","created_at": "2020-07-01 15:10:13"}
Retrieves a list of events for a specified user.
Parameters
Property | Type | Required | Example |
---|---|---|---|
userID | XUID | 94fb96b4-bba4-11ea-b267-0242ac140008 | |
pageNumber | number | 1 |
Usage
const events = await Xedi.Events.getByUser("94fb96b4-bba4-11ea-b267-0242ac140008");
Response
{"current_page": 1,"data": [{"_id": "94fb96b4-bba4-11ea-b267-0242ac140008","translation_key": "events.user.modified.self","translation_params": {"field": {"translation_key": "user.fields.first_name"},"from": "Anthony","to": "Tony"},"context_id": "92ac7274-9369-11ea-9521-01002da17977","actor_id": "92ac7274-9369-11ea-9521-01002da17977","updated_at": "2020-07-01 15:10:13","created_at": "2020-07-01 15:10:13"}],"first_page_url": "https://api.xedi.com/1/events?page=1","from": 1,"last_page": 1,"last_page_url": "https://api.xedi.com/1/events?page=1","next_page_url": null,"path": "https://api.xedi.com/1/events","per_page": 15,"prev_page_url": null,"to": 1,"total": 1}
Retrieves a list of events for a specified business.
Parameters
Property | Type | Required | Example |
---|---|---|---|
businessID | XUID | 2ff01e20-bba9-11ea-8f25-0100f1a50c6e | |
pageNumber | number | 1 |
Usage
const events = await Xedi.Events.getByBusiness("2ff01e20-bba9-11ea-8f25-0100f1a50c6e");
Response
{"current_page": 1,"data": [{"_id": "4a1d2cca-bba9-11ea-8d7c-0100bc2a1e29","translation_key": "events.business.joined","translation_params": {"user": {"_id": "c0575730-bba9-11ea-8da8-01002da17977"}},"context_id": "2ff01e20-bba9-11ea-8f25-0100f1a50c6e","actor_id": "39868f46-bba9-11ea-9f87-01002da17977","updated_at": "2020-07-01 15:10:13","created_at": "2020-07-01 15:10:13"}],"first_page_url": "https://api.xedi.com/1/events?page=1","from": 1,"last_page": 1,"last_page_url": "https://api.xedi.com/1/events?page=1","next_page_url": null,"path": "https://api.xedi.com/1/events","per_page": 15,"prev_page_url": null,"to": 1,"total": 1}
Retrieves a list of events for a specified business filtered by a given user.
Parameters
Property | Type | Required | Example |
---|---|---|---|
businessID | XUID | 2ff01e20-bba9-11ea-8f25-0100f1a50c6e | |
userID | XUID | 94fb96b4-bba4-11ea-b267-0242ac140008 | |
pageNumber | number | 1 |
Usage
const events = await Xedi.Events.getByUserForBusiness("2ff01e20-bba9-11ea-8f25-0100f1a50c6e","94fb96b4-bba4-11ea-b267-0242ac140008");
Response
{"current_page": 1,"data": [{"_id": "4a1d2cca-bba9-11ea-8d7c-0100bc2a1e29","translation_key": "events.business.joined","translation_params": {"user": {"_id": "c0575730-bba9-11ea-8da8-01002da17977"}},"context_id": "2ff01e20-bba9-11ea-8f25-0100f1a50c6e","actor_id": "39868f46-bba9-11ea-9f87-01002da17977","updated_at": "2020-07-01 15:10:13","created_at": "2020-07-01 15:10:13"}],"first_page_url": "https://api.xedi.com/1/events?page=1","from": 1,"last_page": 1,"last_page_url": "https://api.xedi.com/1/events?page=1","next_page_url": null,"path": "https://api.xedi.com/1/events","per_page": 15,"prev_page_url": null,"to": 1,"total": 1}