1919
2020final class LaravelCrisp
2121{
22- public CrispClient $ client ;
22+ public CrispClient $ officialClient ;
2323
2424 public WebsitePeople $ websitePeople ;
2525
@@ -45,24 +45,84 @@ final class LaravelCrisp
4545
4646 public function __construct ()
4747 {
48- $ this ->client = new CrispClient ;
49- $ this ->client ->setTier (config ('crisp.tier ' ));
50- $ this ->client ->authenticate (
48+ $ this ->officialClient = new CrispClient ;
49+ $ this ->officialClient ->setTier (config ('crisp.tier ' ));
50+ $ this ->officialClient ->authenticate (
5151 config ('crisp.access_key_id ' ),
5252 config ('crisp.secret_access_key ' )
5353 );
5454
5555 // Initialize all resource classes
56- $ this ->websitePeople = new WebsitePeople ($ this ->client );
57- $ this ->websiteConversations = new WebsiteConversations ($ this ->client );
58- $ this ->websiteSettings = new WebsiteSettings ($ this ->client );
59- $ this ->websiteOperators = new WebsiteOperators ($ this ->client );
60- $ this ->websiteVisitors = new WebsiteVisitors ($ this ->client );
61- $ this ->websiteAvailability = new WebsiteAvailability ($ this ->client );
62- $ this ->websiteVerify = new WebsiteVerify ($ this ->client );
63- $ this ->userProfile = new UserProfile ($ this ->client );
64- $ this ->pluginSubscriptions = new PluginSubscriptions ($ this ->client );
65- $ this ->buckets = new Buckets ($ this ->client );
66- $ this ->website = new Website ($ this ->client );
56+ $ this ->websitePeople = new WebsitePeople ($ this ->officialClient );
57+ $ this ->websiteConversations = new WebsiteConversations ($ this ->officialClient );
58+ $ this ->websiteSettings = new WebsiteSettings ($ this ->officialClient );
59+ $ this ->websiteOperators = new WebsiteOperators ($ this ->officialClient );
60+ $ this ->websiteVisitors = new WebsiteVisitors ($ this ->officialClient );
61+ $ this ->websiteAvailability = new WebsiteAvailability ($ this ->officialClient );
62+ $ this ->websiteVerify = new WebsiteVerify ($ this ->officialClient );
63+ $ this ->userProfile = new UserProfile ($ this ->officialClient );
64+ $ this ->pluginSubscriptions = new PluginSubscriptions ($ this ->officialClient );
65+ $ this ->buckets = new Buckets ($ this ->officialClient );
66+ $ this ->website = new Website ($ this ->officialClient );
67+ }
68+
69+ public function websitePeople (): WebsitePeople
70+ {
71+ return $ this ->websitePeople ;
72+ }
73+
74+ public function websiteConversations (): WebsiteConversations
75+ {
76+ return $ this ->websiteConversations ;
77+ }
78+
79+ public function websiteSettings (): WebsiteSettings
80+ {
81+ return $ this ->websiteSettings ;
82+ }
83+
84+ public function websiteOperators (): WebsiteOperators
85+ {
86+ return $ this ->websiteOperators ;
87+ }
88+
89+ public function websiteVisitors (): WebsiteVisitors
90+ {
91+ return $ this ->websiteVisitors ;
92+ }
93+
94+ public function websiteAvailability (): WebsiteAvailability
95+ {
96+ return $ this ->websiteAvailability ;
97+ }
98+
99+ public function websiteVerify (): WebsiteVerify
100+ {
101+ return $ this ->websiteVerify ;
102+ }
103+
104+ public function userProfile (): UserProfile
105+ {
106+ return $ this ->userProfile ;
107+ }
108+
109+ public function pluginSubscriptions (): PluginSubscriptions
110+ {
111+ return $ this ->pluginSubscriptions ;
112+ }
113+
114+ public function buckets (): Buckets
115+ {
116+ return $ this ->buckets ;
117+ }
118+
119+ public function website (): Website
120+ {
121+ return $ this ->website ;
122+ }
123+
124+ public function officialClient (): CrispClient
125+ {
126+ return $ this ->officialClient ;
67127 }
68128}
0 commit comments