public ApiClient(IOptions <SquidexOptions> appOptions) { var options = appOptions.Value; var clientManager = new SquidexClientManager(options); pagesClient = clientManager.CreateContentsClient <Page, PageData>("pages"); postsClient = clientManager.CreateContentsClient <BlogPost, BlogPostData>("posts"); }
public void ConnectToCMS(AppOptions appOptions) { var options = new SquidexOptions() { AppName = appOptions.AppName, ClientId = appOptions.ClientId, ClientSecret = appOptions.ClientSecret, Url = appOptions.Url }; clientManager = new SquidexClientManager(options); ledColorsSeqClient = clientManager.CreateContentsClient <LedColorsSeq, LedColorsSeqData>("cp-led-color-sequence"); collectionPointsData = clientManager.CreateContentsClient <CollectionPoint, CollectionPointData>("collection-points"); cpImageAsset = clientManager.CreateContentsClient <ImageAsset, ImageAssetData>("cp-image-asset"); cpQuoteAsset = clientManager.CreateContentsClient <QuoteAsset, QuoteAssetData>("cp-qoute-asset"); }
public FeaturesService(IOptions <MyNewsOptions> options) { if (options.Value.IsConfigured()) { var squidexOptions = new SquidexOptions { AppName = options.Value.AppName, ClientId = options.Value.ClientId, ClientSecret = options.Value.ClientSecret, Url = "https://cloud.squidex.io" }; var clientManager = new SquidexClientManager(squidexOptions); client = clientManager.CreateContentsClient <NewsEntity, FeatureDto>("feature-news"); } }
public ApiClient(IOptions <AppOptions> appOptions) { var options = appOptions.Value; var clientManager = new SquidexClientManager( options.Url, options.AppName, options.ClientId, options.ClientSecret); pagesClient = clientManager.CreateContentsClient <Page, PageData>("pages"); postsClient = clientManager.CreateContentsClient <BlogPost, BlogPostData>("posts"); //pagesClient = clientManager.GetClient<Page, PageData>("pages"); //postsClient = clientManager.GetClient<BlogPost, BlogPostData>("posts"); }
public ContentReferencesFixture() { Task.Run(async() => { try { await TestEntityWithReferences.CreateSchemaAsync(Schemas, AppName, SchemaName); } catch (SquidexManagementException ex) { if (ex.StatusCode != 400) { throw; } } }).Wait(); Contents = ClientManager.CreateContentsClient <TestEntityWithReferences, TestEntityWithReferencesData>(SchemaName); }
public ContentService(IContentsClient contents, ContentManagementOptions options) { UploadChunkSize = options.UploadChunkSize; downloadChunkSize = options.DownloadChunkSize; this.contents = contents; }
public AuthorImporter(ISession session) { client = session.Contents <AuthorContent, AuthorData>("author"); }
public UserStore(SquidexClientManager clientManager) { apiClient = clientManager.CreateContentsClient <UserEntity, UserData>("users"); }
public UserStore(SquidexClientManagerFactory factory) { apiClient = factory.GetContentsClient <UserEntity, UserData>("users"); }