Place lists #1

Merged
raucao merged 5 commits from feature/lists into master 2026-03-13 12:40:08 +00:00
4 changed files with 155 additions and 0 deletions
Showing only changes of commit ba01a579b6 - Show all commits

View File

@@ -41,6 +41,12 @@ console.log(allPlaces);
// List places for specific geohash prefixes (e.g. for a map view)
const areaPlaces = await places.getPlaces(['u33d', 'u33e']);
console.log(areaPlaces);
// Create a list
await places.lists.create('favorites', 'My Favorites');
// Add a place to a list (requires list ID, place ID, and place geohash)
await places.lists.addPlace('favorites', 'place-id-123', 'u33dc0');
```
## API Reference
@@ -52,3 +58,4 @@ console.log(areaPlaces);
### Type Aliases
- [Place](docs/type-aliases/Place.md)
- [List](docs/type-aliases/List.md)

View File

@@ -10,6 +10,7 @@
## Type Aliases
- [List](type-aliases/List.md)
- [Place](type-aliases/Place.md)
## Variables

View File

@@ -6,6 +6,144 @@
# Interface: PlacesClient
## Properties
### lists
> **lists**: `object`
#### addPlace()
> **addPlace**(`listId`, `placeId`, `geohash`): `Promise`\<[`List`](../type-aliases/List.md)\>
Add a place to a list.
##### Parameters
###### listId
`string`
The slug ID of the list.
###### placeId
`string`
The ID of the place.
###### geohash
`string`
The geohash of the place.
##### Returns
`Promise`\<[`List`](../type-aliases/List.md)\>
#### create()
> **create**(`id`, `title`, `color?`): `Promise`\<[`List`](../type-aliases/List.md)\>
Create or update a list.
##### Parameters
###### id
`string`
The slug ID (e.g., "to-go").
###### title
`string`
Human readable title.
###### color?
`string`
Optional hex color code.
##### Returns
`Promise`\<[`List`](../type-aliases/List.md)\>
#### delete()
> **delete**(`id`): `Promise`\<`void`\>
Delete a list.
##### Parameters
###### id
`string`
The slug ID of the list.
##### Returns
`Promise`\<`void`\>
#### get()
> **get**(`id`): `Promise`\<[`List`](../type-aliases/List.md) \| `null`\>
Get a single list by ID (slug).
##### Parameters
###### id
`string`
The slug ID of the list.
##### Returns
`Promise`\<[`List`](../type-aliases/List.md) \| `null`\>
#### getAll()
> **getAll**(): `Promise`\<[`List`](../type-aliases/List.md)[]\>
Get all lists.
##### Returns
`Promise`\<[`List`](../type-aliases/List.md)[]\>
Array of List objects.
#### removePlace()
> **removePlace**(`listId`, `placeId`): `Promise`\<[`List`](../type-aliases/List.md)\>
Remove a place from a list.
##### Parameters
###### listId
`string`
The slug ID of the list.
###### placeId
`string`
The ID of the place.
##### Returns
`Promise`\<[`List`](../type-aliases/List.md)\>
## Methods
### get()

View File

@@ -0,0 +1,9 @@
[**@remotestorage/module-places**](../README.md)
***
[@remotestorage/module-places](../README.md) / List
# Type Alias: List
> **List** = `FromSchema`\<*typeof* `listSchema`\> & `object`