# Ravelry

> Find knitting and crochet patterns and yarns in the Ravelry catalog.

App · 7 actions. Web page: https://docs.lodol.com/docs/integrations/ravelry

## Actions

### Get pattern

Read one Ravelry pattern by ID.

**Inputs**

- Pattern id (`pattern_id`, text, required): The ID from Search patterns.

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page, when available.

**Example output**

```json
{
  "data": {
    "pattern": {
      "id": 1,
      "name": "Sample Shawl",
      "permalink": "sample-shawl"
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get profile

Read the connected Ravelry account profile.

**Inputs**: None.

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page, when available.

**Example output**

```json
{
  "data": {
    "user": {
      "id": 1,
      "username": "crafter"
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get yarn

Read one Ravelry yarn by ID.

**Inputs**

- Yarn id (`yarn_id`, text, required): The ID from Search yarns.

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page, when available.

**Example output**

```json
{
  "data": {
    "yarn": {
      "id": 2,
      "name": "Sample Yarn",
      "permalink": "sample-yarn"
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### List pattern categories

Read Ravelry’s pattern category hierarchy.

**Inputs**: None.

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page, when available.

**Example output**

```json
{
  "data": {
    "pattern_categories": {
      "children": [],
      "id": 301,
      "name": "Categories"
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### List yarn weights

Read the yarn weight names used by Ravelry.

**Inputs**: None.

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page, when available.

**Example output**

```json
{
  "data": {
    "yarn_weights": [
      {
        "id": 1,
        "name": "Lace"
      }
    ]
  },
  "has_more": false,
  "next_cursor": null
}
```

### Search patterns

Find patterns by name in Ravelry.

**Inputs**

- Query (`query`, text, required): Enter a name or keyword.
- Page (`page`, number): Page of matching records to return. At least 1.
- Limit (`limit`, number): Maximum results on a page. From 1 to 100.

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page, when available.

**Example output**

```json
{
  "data": {
    "paginator": {
      "page": 1,
      "page_count": 1,
      "page_size": 5,
      "results": 1
    },
    "patterns": [
      {
        "id": 1,
        "name": "Sample Shawl",
        "permalink": "sample-shawl"
      }
    ]
  },
  "has_more": false,
  "next_cursor": null
}
```

### Search yarns

Find yarns by name in Ravelry.

**Inputs**

- Query (`query`, text, required): Enter a name or keyword.
- Page (`page`, number): Page of matching records to return. At least 1.
- Limit (`limit`, number): Maximum results on a page. From 1 to 100.

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page, when available.

**Example output**

```json
{
  "data": {
    "paginator": {
      "page": 1,
      "page_count": 1,
      "page_size": 5,
      "results": 1
    },
    "yarns": [
      {
        "id": 2,
        "name": "Sample Yarn",
        "permalink": "sample-yarn"
      }
    ]
  },
  "has_more": false,
  "next_cursor": null
}
```
