add GetSpace method

This commit is contained in:
Valentine 2024-07-24 03:46:28 +03:00
parent 571a63bb50
commit f8c200b312
4 changed files with 340 additions and 6 deletions

23
spaces_test.go Normal file
View file

@ -0,0 +1,23 @@
package twitterscraper_test
import (
"errors"
"testing"
)
func TestGetSpace(t *testing.T) {
if skipAuthTest {
t.Skip("Skipping test due to environment variable")
}
spaceId := "1OdJrXPVLEnKX"
space, err := testScraper.GetSpace(spaceId)
if err != nil {
t.Fatal(err)
}
if space.ID != spaceId {
t.Fatal(errors.New("returned space id is not requested"))
}
}