Skip to main content
Glama

Storyden

by Southclaws
Mozilla Public License 2.0
227
matchers_test.go1.18 kB
package collection_test import ( "testing" "github.com/stretchr/testify/assert" "github.com/Southclaws/storyden/app/transports/http/openapi" ) func matchThreadToItem(t *testing.T, thread *openapi.Thread, item openapi.CollectionItem) { t.Helper() a := assert.New(t) itemPost, err := item.Item.AsDatagraphItemPost() a.NoError(err) a.Equal(openapi.DatagraphItemKindPost, itemPost.Kind) a.Equal(thread.Id, itemPost.Ref.Id) a.Equal(thread.CreatedAt, itemPost.Ref.CreatedAt) a.Equal(thread.Title, itemPost.Ref.Title) a.Contains(thread.Slug, itemPost.Ref.Slug) a.Equal(thread.Description, itemPost.Ref.Description) a.Equal(thread.Author, itemPost.Ref.Author) } func matchNodeToItem(t *testing.T, node *openapi.Node, item openapi.CollectionItem) { t.Helper() a := assert.New(t) itemNode, err := item.Item.AsDatagraphItemNode() a.NoError(err) a.Equal(openapi.DatagraphItemKindNode, itemNode.Kind) a.Equal(node.Id, itemNode.Ref.Id) a.Equal(node.CreatedAt, itemNode.Ref.CreatedAt) a.Equal(node.Name, itemNode.Ref.Name) a.Contains(node.Slug, itemNode.Ref.Slug) a.Equal(node.Description, itemNode.Ref.Description) a.Equal(node.Owner, itemNode.Ref.Owner) }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Southclaws/storyden'

If you have feedback or need assistance with the MCP directory API, please join our Discord server