MOHttpManager.m 196 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717
  1. //
  2. // MOHttpManager.m
  3. // MiMoLive
  4. //
  5. // Created by SuperC on 2023/10/12.
  6. //
  7. #import "MOHttpManager.h"
  8. #import "MONetAPIClient.h"
  9. #import "MODynamicBaseUrlAPI.h"
  10. #import "MOApiResponseCacheModel.h"
  11. #import "MOOtherNetAPIClient.h"
  12. @implementation MOHttpManager
  13. + (instancetype)sharedManager
  14. {
  15. static MOHttpManager *shared_manager = nil;
  16. static dispatch_once_t pred;
  17. dispatch_once(&pred, ^
  18. {
  19. shared_manager = [[self alloc] init];
  20. shared_manager.responseCacheDict = [NSMutableDictionary new];
  21. });
  22. return shared_manager;
  23. }
  24. #pragma mark ----- public ------
  25. /// 缓存接口返回数据
  26. - (void)cacheApiData:(id)data key:(NSString *)key
  27. {
  28. MOApiResponseCacheModel *cacheModel = [MOApiResponseCacheModel new];
  29. cacheModel.responseTime = [[NSDate date] timeIntervalSince1970];
  30. cacheModel.responseData = data;
  31. @synchronized (self.responseCacheDict)
  32. {
  33. self.responseCacheDict[key] = cacheModel;
  34. }
  35. }
  36. #pragma mark =========== Login ============
  37. /// 用户引导信息 - 获取用户引导状态
  38. /// result=引导状态,(0=无注册引导,1=进入编辑资料页面,2=进入关注主播页面)
  39. - (void)getGuideWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block {
  40. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",KNetPath_Code_Guide] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  41. {
  42. if (data)
  43. {
  44. if ([self handleError:data])
  45. {
  46. block(data, nil);
  47. }
  48. }
  49. else
  50. {
  51. block(nil, error);
  52. }
  53. }];
  54. }
  55. /// 国家 - IP归属地
  56. /// - Parameters:
  57. /// - params: 参数
  58. /// - block: 回调
  59. -(void)getCountryIpithParams:(id)params andBlock:(void (^)(id data, NSError *error))block {
  60. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",KNetPath_Code_CountryIp] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  61. {
  62. if (data)
  63. {
  64. if ([self handleError:data])
  65. {
  66. block(data, nil);
  67. }
  68. }
  69. else
  70. {
  71. block(nil, error);
  72. }
  73. }];
  74. }
  75. /// 登录,手机 + 密码 - 登入
  76. /// - Parameters:
  77. /// - params: 参数
  78. /// - block: 回调
  79. - (void)loginWithPwdWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  80. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",KNetPath_Code_PwdEnter] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  81. {
  82. if (data)
  83. {
  84. if ([self handleError:data])
  85. {
  86. block(data, nil);
  87. }
  88. }
  89. else
  90. {
  91. block(nil, error);
  92. }
  93. }];
  94. }
  95. /// 登录,手机验证码 - 登入
  96. /// - Parameters:
  97. /// - params: 参数
  98. /// - block: 回调
  99. - (void)logineWithMobileWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  100. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",KNetPath_Code_MobileEnter] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  101. {
  102. if (data)
  103. {
  104. if ([self handleError:data])
  105. {
  106. block(data, nil);
  107. }
  108. }
  109. else
  110. {
  111. block(nil, error);
  112. }
  113. }];
  114. }
  115. /// 登录,手机验证码 - 获取手机验证码
  116. /// - Parameters:
  117. /// - params: 参数
  118. /// - block: 回调
  119. - (void)loginAndGetMobileCodeWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  120. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",KNetPath_Code_GetMobileCode] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  121. {
  122. if (data)
  123. {
  124. if ([self handleError:data])
  125. {
  126. block(data, nil);
  127. }
  128. }
  129. else
  130. {
  131. block(nil, error);
  132. }
  133. }];
  134. }
  135. /// 登录,Google - 登入
  136. /// - Parameters:
  137. /// - params: 参数
  138. /// - block: 回调
  139. - (void)loginWithGoogleWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  140. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",KNetPath_Code_GoogleEnter] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  141. {
  142. if (data)
  143. {
  144. if ([self handleError:data])
  145. {
  146. block(data, nil);
  147. }
  148. }
  149. else
  150. {
  151. block(nil, error);
  152. }
  153. }];
  154. }
  155. /// 登录,Facebook - 登入
  156. /// - Parameters:
  157. /// - params: 参数
  158. /// - block: 回调
  159. - (void)logineWithFacebookWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  160. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",KNetPath_Code_FacebookEnter] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  161. {
  162. if (data)
  163. {
  164. if ([self handleError:data])
  165. {
  166. block(data, nil);
  167. }
  168. }
  169. else
  170. {
  171. block(nil, error);
  172. }
  173. }];
  174. }
  175. /// 登录,Apple(苹果ID) - 登入
  176. /// - Parameters:
  177. /// - params: 参数
  178. /// - block: 回调
  179. - (void)loginWithAppleWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  180. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",KNetPath_Code_AppleEnter] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  181. {
  182. if (data)
  183. {
  184. if ([self handleError:data])
  185. {
  186. block(data, nil);
  187. }
  188. }
  189. else
  190. {
  191. block(nil, error);
  192. }
  193. }];
  194. }
  195. /// 用户信息 - 信息设置
  196. /// - Parameters:
  197. /// - params: 参数
  198. /// - block: 回调
  199. - (void)toSettingInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  200. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",KNetPath_Code_InfoSetting] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  201. {
  202. if (data)
  203. {
  204. if ([self handleError:data])
  205. {
  206. block(data, nil);
  207. }
  208. }
  209. else
  210. {
  211. block(nil, error);
  212. }
  213. }];
  214. }
  215. /// 用户信息 - 随机昵称、随机头像
  216. /// - Parameters:
  217. /// - params: 参数
  218. /// - block: 回调
  219. - (void)randomProfileWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block {
  220. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",KNetPath_Code_RandomProfile] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  221. {
  222. if (data)
  223. {
  224. if ([self handleError:data])
  225. {
  226. block(data, nil);
  227. }
  228. }
  229. else
  230. {
  231. block(nil, error);
  232. }
  233. }];
  234. }
  235. /// 用户信息 - 随机昵称、随机头像(区分性别)
  236. /// - Parameters:
  237. /// - params: 参数
  238. /// - block: 回调
  239. - (void)toGetTheRandomProfileWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  240. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_RandomProfiles] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  241. {
  242. if (data)
  243. {
  244. if ([self handleError:data])
  245. {
  246. block(data, nil);
  247. }
  248. }
  249. else
  250. {
  251. block(nil, error);
  252. }
  253. }];
  254. }
  255. /// 用户登出 - 操作
  256. /// - Parameters:
  257. /// - params: 参数
  258. /// - block: 回调
  259. - (void)toLogoutWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  260. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",KNetPath_Code_Logout] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  261. {
  262. if (data)
  263. {
  264. if ([self handleError:data])
  265. {
  266. block(data, nil);
  267. }
  268. }
  269. else
  270. {
  271. block(nil, error);
  272. }
  273. }];
  274. }
  275. /// 用户手机号码 - 新绑定手机号码
  276. /// - Parameters:
  277. /// - params: 参数
  278. /// - block: 回调
  279. - (void)firstToBingCodeWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  280. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",KNetPath_Code_BingCode] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  281. {
  282. if (data)
  283. {
  284. if ([self handleError:data])
  285. {
  286. block(data, nil);
  287. }
  288. }
  289. else
  290. {
  291. block(nil, error);
  292. }
  293. }];
  294. }
  295. /// 用户手机号码 - 绑定手机号码 提交
  296. /// - Parameters:
  297. /// - params: 参数
  298. /// - block: 回调
  299. - (void)toBingAndSubmitWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  300. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",KNetPath_Code_BindSubmit] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  301. {
  302. if (data)
  303. {
  304. if ([self handleError:data])
  305. {
  306. block(data, nil);
  307. }
  308. }
  309. else
  310. {
  311. block(nil, error);
  312. }
  313. }];
  314. }
  315. /// 用户手机号码 - 密码重置 - 获取手机验证码
  316. /// - Parameters:
  317. /// - params: 参数
  318. /// - block: 回调
  319. - (void)toGetPassworkCodeWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  320. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",KNetPath_Code_GetPasswordCode] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  321. {
  322. if (data)
  323. {
  324. if ([self handleError:data])
  325. {
  326. block(data, nil);
  327. }
  328. }
  329. else
  330. {
  331. block(nil, error);
  332. }
  333. }];
  334. }
  335. /// 用户手机号码 - 密码重置 - 提交重置
  336. /// - Parameters:
  337. /// - params: 参数
  338. /// - block: 回调
  339. - (void)toResetPasswordWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  340. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",KNetPath_Code_PasswordReset] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  341. {
  342. if (data)
  343. {
  344. if ([self handleError:data])
  345. {
  346. block(data, nil);
  347. }
  348. }
  349. else
  350. {
  351. block(nil, error);
  352. }
  353. }];
  354. }
  355. /// 用户信息 - 加入粉丝团设置 开关
  356. /// - Parameters:
  357. /// - params: 参数
  358. /// - block: 回调
  359. - (void)toJoinFansClubWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  360. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",KNetPath_Code_JoinFansClub] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  361. {
  362. if (data)
  363. {
  364. if ([self handleError:data])
  365. {
  366. block(data, nil);
  367. }
  368. }
  369. else
  370. {
  371. block(nil, error);
  372. }
  373. }];
  374. }
  375. /// 用户信息 - 删除用户
  376. /// - Parameters:
  377. /// - params: 参数
  378. /// - block: 回调
  379. - (void)toDeleteTheUserWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  380. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",KNetPath_Code_UserToDelete] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  381. {
  382. if (data)
  383. {
  384. if ([self handleError:data])
  385. {
  386. block(data, nil);
  387. }
  388. }
  389. else
  390. {
  391. block(nil, error);
  392. }
  393. }];
  394. }
  395. /// 用户信息 - 语言设置
  396. /// - Parameters:
  397. /// - params: 参数
  398. /// - block: 回调
  399. - (void)toSetLanguageWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block {
  400. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",KNetPath_Code_UserInfoLanguage] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  401. {
  402. if (data)
  403. {
  404. if ([self handleError:data])
  405. {
  406. block(data, nil);
  407. }
  408. }
  409. else
  410. {
  411. block(nil, error);
  412. }
  413. }];
  414. }
  415. /// 忘记密码-密码重置2 - 获取手机验证码
  416. /// - Parameters:
  417. /// - params: 参数
  418. /// - block: 回调
  419. - (void)toGetPasswordCode2WithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  420. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",KNetPath_Code_GetPasswordCode2] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  421. {
  422. if (data)
  423. {
  424. if ([self handleError:data])
  425. {
  426. block(data, nil);
  427. }
  428. }
  429. else
  430. {
  431. block(nil, error);
  432. }
  433. }];
  434. }
  435. /// 忘记密码-密码重置2 - 检查手机验证码
  436. /// - Parameters:
  437. /// - params: 参数
  438. /// - block: 回调
  439. - (void)toVerifyTheSmsCodeWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  440. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",KNetPath_Code_TheCodeVerify] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  441. {
  442. if (data)
  443. {
  444. if ([self handleError:data])
  445. {
  446. block(data, nil);
  447. }
  448. }
  449. else
  450. {
  451. block(nil, error);
  452. }
  453. }];
  454. }
  455. /// 忘记密码-密码重置2 - 提交重置
  456. /// - Parameters:
  457. /// - params: 参数
  458. /// - block: 回调
  459. - (void)toResetThePassword2WithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  460. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",KNetPath_Code_PasswordReset2] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  461. {
  462. if (data)
  463. {
  464. if ([self handleError:data])
  465. {
  466. block(data, nil);
  467. }
  468. }
  469. else
  470. {
  471. block(nil, error);
  472. }
  473. }];
  474. }
  475. #pragma mark =========== Rank ============
  476. /// 排行榜 - 贡献榜
  477. /// - Parameters:
  478. /// - params: 参数
  479. /// - block: 回调
  480. - (void)toGetRankOutcomeListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  481. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",KNetPath_Code_RankOutComeList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  482. {
  483. if (data)
  484. {
  485. if ([self handleError:data])
  486. {
  487. block(data, nil);
  488. }
  489. }
  490. else
  491. {
  492. block(nil, error);
  493. }
  494. }];
  495. }
  496. /// 排行榜 - 直播半小时榜单
  497. /// - Parameters:
  498. /// - params: 参数
  499. /// - block: 回调
  500. - (void)toGetRankHalfHourListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  501. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",KNetPath_Code_RankHalfHour] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  502. {
  503. if (data)
  504. {
  505. if ([self handleError:data])
  506. {
  507. block(data, nil);
  508. }
  509. }
  510. else
  511. {
  512. block(nil, error);
  513. }
  514. }];
  515. }
  516. /// 排行榜 - 收益榜
  517. /// - Parameters:
  518. /// - params: 参数
  519. /// - block: 回调
  520. - (void)toGetRankIncomeListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  521. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",KNetPath_Code_RankIncome] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  522. {
  523. if (data)
  524. {
  525. if ([self handleError:data])
  526. {
  527. block(data, nil);
  528. }
  529. }
  530. else
  531. {
  532. block(nil, error);
  533. }
  534. }];
  535. }
  536. /// 排行榜 - 直播间贡献榜
  537. /// - Parameters:
  538. /// - params: 参数
  539. /// - block: 回调
  540. - (void)toGetRankOutcomeRoomWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  541. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_RankOutComeRoom] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  542. {
  543. if (data)
  544. {
  545. if ([self handleError:data])
  546. {
  547. block(data, nil);
  548. }
  549. }
  550. else
  551. {
  552. block(nil, error);
  553. }
  554. }];
  555. }
  556. /// 排行榜 - PK榜
  557. /// - Parameters:
  558. /// - params: 参数
  559. /// - block: 回调
  560. - (void)toGetRankListAboutPkWeekWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  561. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_RankPkWeek] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  562. {
  563. if (data)
  564. {
  565. if ([self handleError:data])
  566. {
  567. block(data, nil);
  568. }
  569. }
  570. else
  571. {
  572. block(nil, error);
  573. }
  574. }];
  575. }
  576. /// 排行榜 - TOP的前3名用户信息
  577. /// - Parameters:
  578. /// - params: 参数
  579. /// - block: 回调
  580. - (void)toGetTheRankTopsWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  581. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_RankTops] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  582. {
  583. if (data)
  584. {
  585. if ([self handleError:data])
  586. {
  587. block(data, nil);
  588. }
  589. }
  590. else
  591. {
  592. block(nil, error);
  593. }
  594. }];
  595. }
  596. /// 排行榜 - 用户贡献榜TOP的前3名用户信息
  597. /// - Parameters:
  598. /// - params: 参数
  599. /// - block: 回调
  600. - (void)toGetUserOutcomeTopsWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  601. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_RankOutTops] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  602. {
  603. if (data)
  604. {
  605. if ([self handleError:data])
  606. {
  607. block(data, nil);
  608. }
  609. }
  610. else
  611. {
  612. block(nil, error);
  613. }
  614. }];
  615. }
  616. /// 排行榜 - 直播间嘉宾贡献榜
  617. /// - Parameters:
  618. /// - params: 参数
  619. /// - block: 回调
  620. - (void)toGetTheOutcomeAboutGuestWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  621. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_TheGuestRank] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  622. {
  623. if (data)
  624. {
  625. if ([self handleError:data])
  626. {
  627. block(data, nil);
  628. }
  629. }
  630. else
  631. {
  632. block(nil, error);
  633. }
  634. }];
  635. }
  636. /// 直播间热度排行榜
  637. /// - Parameters:
  638. /// - params: 参数
  639. /// - block: 回调
  640. - (void)toGetRoomHeatRankWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  641. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveHeatRank] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  642. {
  643. if (data)
  644. {
  645. if ([self handleError:data])
  646. {
  647. block(data, nil);
  648. }
  649. }
  650. else
  651. {
  652. block(nil, error);
  653. }
  654. }];
  655. }
  656. /// 直播间操作 - 音视频操作
  657. /// - Parameters:
  658. /// - params: 参数
  659. /// - block: 回调
  660. - (void)toOperationMediaAboutTheLiveWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  661. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveOperationMedia] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  662. {
  663. if (data)
  664. {
  665. if ([self handleError:data])
  666. {
  667. block(data, nil);
  668. }
  669. }
  670. else
  671. {
  672. block(nil, error);
  673. }
  674. }];
  675. }
  676. /// 直播间 - 嘉宾连麦统计信息
  677. /// - Parameters:
  678. /// - params: 参数
  679. /// - block: 回调
  680. - (void)toGetTheLiveLinkMicGuestSummaryWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  681. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveLinkMicSummary] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  682. {
  683. if (data)
  684. {
  685. if ([self handleError:data])
  686. {
  687. block(data, nil);
  688. }
  689. }
  690. else
  691. {
  692. block(nil, error);
  693. }
  694. }];
  695. }
  696. - (void)toRecoveryTheLiveWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  697. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveRecovery] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  698. {
  699. if (data)
  700. {
  701. if ([self handleError:data])
  702. {
  703. block(data, nil);
  704. }
  705. }
  706. else
  707. {
  708. block(nil, error);
  709. }
  710. }];
  711. }
  712. /// 直播间 - 用户端 - 进入直播间且rtm已上线
  713. /// - Parameters:
  714. /// - params: 参数
  715. /// - block: 回调
  716. - (void)reportRtmOnlineSuccessWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block {
  717. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_OnlineRtm] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  718. {
  719. if (data)
  720. {
  721. if ([self handleError:data])
  722. {
  723. block(data, nil);
  724. }
  725. }
  726. else
  727. {
  728. block(nil, error);
  729. }
  730. }];
  731. }
  732. #pragma mark =========== LiveRoom ============
  733. /// 直播间相关 - 开启直播间
  734. /// - Parameters:
  735. /// - params: 参数
  736. /// - block: 回调
  737. - (void)toOpenLiveRoomWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  738. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveRoomOpen] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  739. {
  740. if (data)
  741. {
  742. if ([self handleError:data])
  743. {
  744. block(data, nil);
  745. }
  746. }
  747. else
  748. {
  749. block(nil, error);
  750. }
  751. }];
  752. }
  753. /// 直播间列表 - 直播间列表
  754. /// - Parameters:
  755. /// - params: 参数
  756. /// - block: 回调
  757. - (void)getLiveRoomListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  758. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveRoomList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  759. {
  760. if (data)
  761. {
  762. if ([self handleError:data])
  763. {
  764. block(data, nil);
  765. }
  766. }
  767. else
  768. {
  769. block(nil, error);
  770. }
  771. }];
  772. }
  773. /// 直播间列表 - 关注主播列表
  774. /// - Parameters:
  775. /// - params: 参数
  776. /// - block: 回调
  777. - (void)getLiveRoomFollowListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  778. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveRoomFollow] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  779. {
  780. if (data)
  781. {
  782. if ([self handleError:data])
  783. {
  784. block(data, nil);
  785. }
  786. }
  787. else
  788. {
  789. block(nil, error);
  790. }
  791. }];
  792. }
  793. /// 直播标签 - 标签列表
  794. /// - Parameters:
  795. /// - params: 参数
  796. /// - block: 回调
  797. - (void)toGetLiveTagListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  798. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveTagList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  799. {
  800. if (data)
  801. {
  802. if ([self handleError:data])
  803. {
  804. block(data, nil);
  805. }
  806. }
  807. else
  808. {
  809. block(nil, error);
  810. }
  811. }];
  812. }
  813. /// 直播间 - 房间状态
  814. /// - Parameters:
  815. /// - params: 参数
  816. /// - block: 回调
  817. - (void)toGetLiveRoomStatusWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  818. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveRoomStatus] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  819. {
  820. if (data)
  821. {
  822. if ([self handleError:data])
  823. {
  824. block(data, nil);
  825. }
  826. }
  827. else
  828. {
  829. block(nil, error);
  830. }
  831. }];
  832. }
  833. /// 直播间 - 主播端 - 设置房管
  834. /// - Parameters:
  835. /// - params: 参数
  836. /// - block: 回调
  837. - (void)toSetLiveManagerWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  838. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveManageSet] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  839. {
  840. if (data)
  841. {
  842. if ([self handleError:data])
  843. {
  844. block(data, nil);
  845. }
  846. }
  847. else
  848. {
  849. block(nil, error);
  850. }
  851. }];
  852. }
  853. /// 直播间 - 房管-主播端 - 禁言
  854. /// - Parameters:
  855. /// - params: 参数
  856. /// - block: 回调
  857. - (void)toSetLiveSilenceWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  858. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveSilenceSet] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  859. {
  860. if (data)
  861. {
  862. if ([self handleError:data])
  863. {
  864. block(data, nil);
  865. }
  866. }
  867. else
  868. {
  869. block(nil, error);
  870. }
  871. }];
  872. }
  873. /// 直播间 - 房管-主播端 - 移除麦位的人
  874. /// - Parameters:
  875. /// - params: 参数
  876. /// - block: 回调
  877. - (void)theManageToRemoveLinkMicWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  878. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveManageRemove] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  879. {
  880. if (data)
  881. {
  882. if ([self handleError:data])
  883. {
  884. block(data, nil);
  885. }
  886. }
  887. else
  888. {
  889. block(nil, error);
  890. }
  891. }];
  892. }
  893. /// 直播间 - 房管-主播端 - 锁定麦位
  894. /// - Parameters:
  895. /// - params: 参数
  896. /// - block: 回调
  897. - (void)theManageToLockLinkMicWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  898. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveMicLock] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  899. {
  900. if (data)
  901. {
  902. if ([self handleError:data])
  903. {
  904. block(data, nil);
  905. }
  906. }
  907. else
  908. {
  909. block(nil, error);
  910. }
  911. }];
  912. }
  913. /// 直播间 - 房管-主播端 - 上麦申请审核
  914. /// - Parameters:
  915. /// - params: 参数
  916. /// - block: 回调
  917. - (void)theManageToAuditLinkMicWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  918. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveMicAudit] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  919. {
  920. if (data)
  921. {
  922. if ([self handleError:data])
  923. {
  924. block(data, nil);
  925. }
  926. }
  927. else
  928. {
  929. block(nil, error);
  930. }
  931. }];
  932. }
  933. /// 直播间 - 房管-主播端 - 踢出成员
  934. /// - Parameters:
  935. /// - params: 参数
  936. /// - block: 回调
  937. - (void)theManageToKickOutSomeOneWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  938. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveKickOut] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  939. {
  940. if (data)
  941. {
  942. if ([self handleError:data])
  943. {
  944. block(data, nil);
  945. }
  946. }
  947. else
  948. {
  949. block(nil, error);
  950. }
  951. }];
  952. }
  953. /// 直播间 - 主播端 - 获取房间的数据中心
  954. /// - Parameters:
  955. /// - params: 参数
  956. /// - block: 回调
  957. - (void)toGetLiveCenterInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  958. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveManageCenter] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  959. {
  960. if (data)
  961. {
  962. if ([self handleError:data])
  963. {
  964. block(data, nil);
  965. }
  966. }
  967. else
  968. {
  969. block(nil, error);
  970. }
  971. }];
  972. }
  973. /// 直播间 - 用户端 - 关闭连麦
  974. /// - Parameters:
  975. /// - params: 参数
  976. /// - block: 回调
  977. - (void)TheLinkMicToLeaveTheLiveWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  978. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveMicLeave] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  979. {
  980. if (data)
  981. {
  982. if ([self handleError:data])
  983. {
  984. block(data, nil);
  985. }
  986. }
  987. else
  988. {
  989. block(nil, error);
  990. }
  991. }];
  992. }
  993. /// 直播间 - 用户端 - 上麦申请
  994. /// - Parameters:
  995. /// - params: 参数
  996. /// - block: 回调
  997. - (void)toApplyLinkMicWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  998. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveMicApply] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  999. {
  1000. if (data)
  1001. {
  1002. if ([self handleError:data])
  1003. {
  1004. block(data, nil);
  1005. }
  1006. }
  1007. else
  1008. {
  1009. block(nil, error);
  1010. }
  1011. }];
  1012. }
  1013. /// 直播间 - 上麦申请列表
  1014. /// - Parameters:
  1015. /// - params: 参数
  1016. /// - block: 回调
  1017. - (void)toGetApplyListAboutLinkMicWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1018. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveMicApplyList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1019. {
  1020. if (data)
  1021. {
  1022. if ([self handleError:data])
  1023. {
  1024. block(data, nil);
  1025. }
  1026. }
  1027. else
  1028. {
  1029. block(nil, error);
  1030. }
  1031. }];
  1032. }
  1033. /// 直播间 - 用户端 - 上麦申请取消
  1034. /// - Parameters:
  1035. /// - params: 参数
  1036. /// - block: 回调
  1037. - (void)toCancelTheApplyLinkMicWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1038. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveMicAppleyCancel] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1039. {
  1040. if (data)
  1041. {
  1042. if ([self handleError:data])
  1043. {
  1044. block(data, nil);
  1045. }
  1046. }
  1047. else
  1048. {
  1049. block(nil, error);
  1050. }
  1051. }];
  1052. }
  1053. /// 直播间 - 贵族列表
  1054. /// - Parameters:
  1055. /// - params: 参数
  1056. /// - block: 回调
  1057. - (void)toGetJoinVipsAboutLiveWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1058. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveVipList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1059. {
  1060. if (data)
  1061. {
  1062. if ([self handleError:data])
  1063. {
  1064. block(data, nil);
  1065. }
  1066. }
  1067. else
  1068. {
  1069. block(nil, error);
  1070. }
  1071. }];
  1072. }
  1073. /// 直播间 - 查看他人信息
  1074. /// - Parameters:
  1075. /// - params: 参数
  1076. /// - block: 回调
  1077. - (void)toGetTheUserInfoInLiveRoomWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1078. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_TheLiveMember] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1079. {
  1080. if (data)
  1081. {
  1082. if ([self handleError:data])
  1083. {
  1084. block(data, nil);
  1085. }
  1086. }
  1087. else
  1088. {
  1089. block(nil, error);
  1090. }
  1091. }];
  1092. }
  1093. /// 直播间 - 房间在线成员
  1094. /// - Parameters:
  1095. /// - params: 参数
  1096. /// - block: 回调
  1097. - (void)toGetJoinMembersAboutLiveWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1098. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveMembers] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1099. {
  1100. if (data)
  1101. {
  1102. if ([self handleError:data])
  1103. {
  1104. block(data, nil);
  1105. }
  1106. }
  1107. else
  1108. {
  1109. block(nil, error);
  1110. }
  1111. }];
  1112. }
  1113. /// 直播间 - 管理员列表 (VIP 列表)
  1114. /// - Parameters:
  1115. /// - params: 参数
  1116. /// - block: 回调
  1117. - (void)toGetJoinManagesAboutLiveWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1118. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveVipViewer] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1119. {
  1120. if (data)
  1121. {
  1122. if ([self handleError:data])
  1123. {
  1124. block(data, nil);
  1125. }
  1126. }
  1127. else
  1128. {
  1129. block(nil, error);
  1130. }
  1131. }];
  1132. }
  1133. /// 直播间 - 用户端 - 离开直播间
  1134. /// - Parameters:
  1135. /// - params: 参数
  1136. /// - block: 回调
  1137. - (void)toLeaveTheLiveWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1138. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveToLeave] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1139. {
  1140. if (data)
  1141. {
  1142. if ([self handleError:data])
  1143. {
  1144. block(data, nil);
  1145. }
  1146. }
  1147. else
  1148. {
  1149. block(nil, error);
  1150. }
  1151. }];
  1152. }
  1153. /// 直播间 - 用户端 - 进入直播间
  1154. /// - Parameters:
  1155. /// - params: 参数
  1156. /// - block: 回调
  1157. - (void)toJoinEnterTheLiveWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1158. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveToEnter] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1159. {
  1160. if (data)
  1161. {
  1162. if ([self handleError:data])
  1163. {
  1164. block(data, nil);
  1165. }
  1166. }
  1167. else
  1168. {
  1169. block(nil, error);
  1170. }
  1171. }];
  1172. }
  1173. /// 直播间 - 用户端 - 进入直播间(二次确认)
  1174. /// - Parameters:
  1175. /// - params: 参数
  1176. /// - block: 回调
  1177. - (void)toJoinLiveWithConfirmWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1178. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveJoinConfirm] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1179. {
  1180. if (data)
  1181. {
  1182. if ([self handleError:data])
  1183. {
  1184. block(data, nil);
  1185. }
  1186. }
  1187. else
  1188. {
  1189. block(nil, error);
  1190. }
  1191. }];
  1192. }
  1193. /// 直播间 - 主播端 - 关闭直播间
  1194. /// - Parameters:
  1195. /// - params: 参数
  1196. /// - block: 回调
  1197. - (void)toCloseTheLiveRoomWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1198. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveToClose] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1199. {
  1200. if (data)
  1201. {
  1202. if ([self handleError:data])
  1203. {
  1204. block(data, nil);
  1205. }
  1206. }
  1207. else
  1208. {
  1209. block(nil, error);
  1210. }
  1211. }];
  1212. }
  1213. /// 直播模块 - 用户端 - 心跳汇报
  1214. /// - Parameters:
  1215. /// - params: 参数
  1216. /// - block: 回调
  1217. - (void)toReportAboutViewerLiveWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1218. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveReportViewer] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1219. {
  1220. if (data)
  1221. {
  1222. if ([self handleError:data])
  1223. {
  1224. block(data, nil);
  1225. }
  1226. }
  1227. else
  1228. {
  1229. block(nil, error);
  1230. }
  1231. }];
  1232. }
  1233. /// 直播模块 - 主播端 - 心跳汇报
  1234. /// - Parameters:
  1235. /// - params: 参数
  1236. /// - block: 回调
  1237. - (void)toReportAboutAnchorLiveWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1238. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveReportAnchor] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1239. {
  1240. if (data)
  1241. {
  1242. if ([self handleError:data])
  1243. {
  1244. block(data, nil);
  1245. }
  1246. }
  1247. else
  1248. {
  1249. block(nil, error);
  1250. }
  1251. }];
  1252. }
  1253. /// 直播间 - 主播端 - 正在开启的直播间(只允许直播调用)
  1254. /// - Parameters:
  1255. /// - params: 参数
  1256. /// - block: 回调
  1257. - (void)theAnchorGetLiveRoomWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1258. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_TheRoomLiving] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1259. {
  1260. if (data)
  1261. {
  1262. if ([self handleError:data])
  1263. {
  1264. block(data, nil);
  1265. }
  1266. }
  1267. else
  1268. {
  1269. block(nil, error);
  1270. }
  1271. }];
  1272. }
  1273. /// 直播间 - 开播配置信息
  1274. /// - Parameters:
  1275. /// - params: 参数
  1276. /// - block: 回调
  1277. - (void)getTheLiveConfigInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1278. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveConfig] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1279. {
  1280. if (data)
  1281. {
  1282. if ([self handleError:data])
  1283. {
  1284. block(data, nil);
  1285. }
  1286. }
  1287. else
  1288. {
  1289. block(nil, error);
  1290. }
  1291. }];
  1292. }
  1293. /// 直播 - 观看历史
  1294. /// - Parameters:
  1295. /// - params: 参数
  1296. /// - block: 回调
  1297. - (void)toGetTheLiveHistoryListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1298. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveHistoryInfo] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1299. {
  1300. if (data)
  1301. {
  1302. if ([self handleError:data])
  1303. {
  1304. block(data, nil);
  1305. }
  1306. }
  1307. else
  1308. {
  1309. block(nil, error);
  1310. }
  1311. }];
  1312. }
  1313. /// 直播 - 观看历史删除
  1314. /// - Parameters:
  1315. /// - params: 参数
  1316. /// - block: 回调
  1317. - (void)toDeleteTheLiveHistoryWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1318. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveHistoryDelete] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1319. {
  1320. if (data)
  1321. {
  1322. if ([self handleError:data])
  1323. {
  1324. block(data, nil);
  1325. }
  1326. }
  1327. else
  1328. {
  1329. block(nil, error);
  1330. }
  1331. }];
  1332. }
  1333. /// 直播弹幕 - 提交
  1334. /// - Parameters:
  1335. /// - params: 参数
  1336. /// - block: 回调
  1337. - (void)toSubmitBarrageInLiveWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1338. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveBarrageSubmit] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1339. {
  1340. if (data)
  1341. {
  1342. if ([self handleError:data])
  1343. {
  1344. block(data, nil);
  1345. }
  1346. }
  1347. else
  1348. {
  1349. block(nil, error);
  1350. }
  1351. }];
  1352. }
  1353. /// 直播间 - TOP用户列表
  1354. /// - Parameters:
  1355. /// - params: 参数
  1356. /// - block: 回调
  1357. - (void)theTopsUserAboutLiveRoomWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1358. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveTopsUser] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1359. {
  1360. if (data)
  1361. {
  1362. if ([self handleError:data])
  1363. {
  1364. block(data, nil);
  1365. }
  1366. }
  1367. else
  1368. {
  1369. block(nil, error);
  1370. }
  1371. }];
  1372. }
  1373. /// 直播公屏 - 提交
  1374. /// - Parameters:
  1375. /// - params: 参数
  1376. /// - block: 回调
  1377. - (void)toSubmitPublicScreenWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1378. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LivePublicSubmit] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1379. {
  1380. if (data)
  1381. {
  1382. if ([self handleError:data])
  1383. {
  1384. block(data, nil);
  1385. }
  1386. }
  1387. else
  1388. {
  1389. block(nil, error);
  1390. }
  1391. }];
  1392. }
  1393. /// 直播间 - 不感兴趣的直播间
  1394. /// - Parameters:
  1395. /// - params: 参数
  1396. /// - block: 回调
  1397. - (void)toSubmitTheDisinterestRoomWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1398. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveNoLike] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1399. {
  1400. if (data)
  1401. {
  1402. if ([self handleError:data])
  1403. {
  1404. block(data, nil);
  1405. }
  1406. }
  1407. else
  1408. {
  1409. block(nil, error);
  1410. }
  1411. }];
  1412. }
  1413. /// 直播间 - 根据ID,获取房间信息
  1414. /// - Parameters:
  1415. /// - params: 参数
  1416. /// - block: 回调
  1417. - (void)toGetLiveRoomInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1418. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveRoomInfo] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1419. {
  1420. if (data)
  1421. {
  1422. if ([self handleError:data])
  1423. {
  1424. block(data, nil);
  1425. }
  1426. }
  1427. else
  1428. {
  1429. block(nil, error);
  1430. }
  1431. }];
  1432. }
  1433. /// 直播间 - 主播端 - 房间挂起
  1434. /// - Parameters:
  1435. /// - params: 参数
  1436. /// - block: 回调
  1437. - (void)toPendingTheLiveRoomWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1438. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LivePending] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1439. {
  1440. if (data)
  1441. {
  1442. if ([self handleError:data])
  1443. {
  1444. block(data, nil);
  1445. }
  1446. }
  1447. else
  1448. {
  1449. block(nil, error);
  1450. }
  1451. }];
  1452. }
  1453. /// 直播间 - 主播端 - 转门票房.设置
  1454. /// - Parameters:
  1455. /// - params: 参数
  1456. /// - block: 回调
  1457. - (void)toSettingConvertTheLiveRoomWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1458. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveConvertSet] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1459. {
  1460. if (data)
  1461. {
  1462. if ([self handleError:data])
  1463. {
  1464. block(data, nil);
  1465. }
  1466. }
  1467. else
  1468. {
  1469. block(nil, error);
  1470. }
  1471. }];
  1472. }
  1473. /// 直播间 - 主播端 - 转门票房.提交
  1474. /// - Parameters:
  1475. /// - params: 参数
  1476. /// - block: 回调
  1477. - (void)toSubmitConvertAboutLiveRoomWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1478. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveConvertSubmit] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1479. {
  1480. if (data)
  1481. {
  1482. if ([self handleError:data])
  1483. {
  1484. block(data, nil);
  1485. }
  1486. }
  1487. else
  1488. {
  1489. block(nil, error);
  1490. }
  1491. }];
  1492. }
  1493. /// 直播间 - 转换房间 - 支付
  1494. /// - params: 参数
  1495. /// - block: 回调
  1496. - (void)toConvertPayTheTicketRoomWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1497. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveConvertPay] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1498. {
  1499. if (data)
  1500. {
  1501. if ([self handleError:data])
  1502. {
  1503. block(data, nil);
  1504. }
  1505. }
  1506. else
  1507. {
  1508. block(nil, error);
  1509. }
  1510. }];
  1511. }
  1512. /// 直播间列表 - 检查已经关闭的直播间
  1513. /// - Parameters:
  1514. /// - params: 参数
  1515. /// - block: 回调
  1516. - (void)toCheckTheLiveRoomListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1517. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_CheckTheLiveRoom] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1518. {
  1519. if (data)
  1520. {
  1521. if ([self handleError:data])
  1522. {
  1523. block(data, nil);
  1524. }
  1525. }
  1526. else
  1527. {
  1528. block(nil, error);
  1529. }
  1530. }];
  1531. }
  1532. /// 直播间列表 - 分类信息
  1533. /// - Parameters:
  1534. /// - params: 参数
  1535. /// - block: 回调
  1536. - (void)toGetTheLiveRoomCategoryDataWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1537. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_TheLiveRoomCategory] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1538. {
  1539. if (data)
  1540. {
  1541. if ([self handleError:data])
  1542. {
  1543. block(data, nil);
  1544. }
  1545. }
  1546. else
  1547. {
  1548. block(nil, error);
  1549. }
  1550. }];
  1551. }
  1552. /// 直播间 - 样式选项
  1553. /// - Parameters:
  1554. /// - params: 参数
  1555. /// - block: 回调
  1556. - (void)toGetTheLiveRoomCongifThemeWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1557. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveConfigTheme] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1558. {
  1559. if (data)
  1560. {
  1561. if ([self handleError:data])
  1562. {
  1563. block(data, nil);
  1564. }
  1565. }
  1566. else
  1567. {
  1568. block(nil, error);
  1569. }
  1570. }];
  1571. }
  1572. /// 直播间 - 主播端 - 音视频锁定.批量操作
  1573. /// - Parameters:
  1574. /// - params: 参数
  1575. /// - block: 回调
  1576. - (void)toSwitchTheLinkMicDataWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1577. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LinkMicSwitch] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1578. {
  1579. if (data)
  1580. {
  1581. if ([self handleError:data])
  1582. {
  1583. block(data, nil);
  1584. }
  1585. }
  1586. else
  1587. {
  1588. block(nil, error);
  1589. }
  1590. }];
  1591. }
  1592. /// 用户端 - 直播间送礼物.批量
  1593. /// - Parameters:
  1594. /// - params: 参数
  1595. /// - block: 回调
  1596. - (void)toSendMoreOneGiftWithParams:(id)params andBlock:(void (^)(id _Nullable data, NSError *error))block{
  1597. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveGiftGivings] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1598. {
  1599. if (data)
  1600. {
  1601. if ([self handleError:data])
  1602. {
  1603. block(data, nil);
  1604. }
  1605. }
  1606. else
  1607. {
  1608. block(nil, error);
  1609. }
  1610. }];
  1611. }
  1612. /// 用户端 - 直播间送礼物(赠送背包的).批量
  1613. /// - Parameters:
  1614. /// - params: 参数
  1615. /// - block: 回调
  1616. - (void)toSendMoreOneGiftAboutPackWithParams:(id)params andBlock:(void (^)(id _Nullable data, NSError *error))block{
  1617. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveGiftGivingPacks] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1618. {
  1619. if (data)
  1620. {
  1621. if ([self handleError:data])
  1622. {
  1623. block(data, nil);
  1624. }
  1625. }
  1626. else
  1627. {
  1628. block(nil, error);
  1629. }
  1630. }];
  1631. }
  1632. /// 直播间 - 连麦邀请列表(仅管理员-主播请求)
  1633. /// - Parameters:
  1634. /// - params: 参数
  1635. /// - block: 回调
  1636. - (void)toGetTheLinkMicInviteListDataWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1637. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveLinkMicInviteList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1638. {
  1639. if (data)
  1640. {
  1641. if ([self handleError:data])
  1642. {
  1643. block(data, nil);
  1644. }
  1645. }
  1646. else
  1647. {
  1648. block(nil, error);
  1649. }
  1650. }];
  1651. }
  1652. /// 直播间 - 连麦邀请 - 同意上麦
  1653. /// - Parameters:
  1654. /// - params: 参数
  1655. /// - block: 回调
  1656. - (void)toAgreedTheLinkMicInviteWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1657. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveLinkMicInviteAgreed] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1658. {
  1659. if (data)
  1660. {
  1661. if ([self handleError:data])
  1662. {
  1663. block(data, nil);
  1664. }
  1665. }
  1666. else
  1667. {
  1668. block(nil, error);
  1669. }
  1670. }];
  1671. }
  1672. /// 直播间 - 连麦邀请密钥(仅管理员-主播请求)
  1673. /// - Parameters:
  1674. /// - params: 参数
  1675. /// - block: 回调
  1676. - (void)toGetTheUserLinkStrWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1677. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_GetTheLinkStr] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1678. {
  1679. if (data)
  1680. {
  1681. if ([self handleError:data])
  1682. {
  1683. block(data, nil);
  1684. }
  1685. }
  1686. else
  1687. {
  1688. block(nil, error);
  1689. }
  1690. }];
  1691. }
  1692. /// 直播间变化 - 多人连麦房间样式.麦位发生变化
  1693. /// - Parameters:
  1694. /// - params: 参数
  1695. /// - block: 回调
  1696. - (void)toChangeTheMultipleDataWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1697. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_ChangeTheMultiple] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1698. {
  1699. if (data)
  1700. {
  1701. if ([self handleError:data])
  1702. {
  1703. block(data, nil);
  1704. }
  1705. }
  1706. else
  1707. {
  1708. block(nil, error);
  1709. }
  1710. }];
  1711. }
  1712. /// 直播间 - 封面示例
  1713. /// - Parameters:
  1714. /// - params: 参数
  1715. /// - block: 回调
  1716. - (void)getCoverTemplatesDataWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block {
  1717. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_CoverTemplates] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1718. {
  1719. if (data)
  1720. {
  1721. if ([self handleError:data])
  1722. {
  1723. block(data, nil);
  1724. }
  1725. }
  1726. else
  1727. {
  1728. block(nil, error);
  1729. }
  1730. }];
  1731. }
  1732. /// 直播间配置 - 直播间打招呼配置
  1733. /// - Parameters:
  1734. /// - params: 参数
  1735. /// - block: 回调
  1736. - (void)setSayHelloWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block {
  1737. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_SetSayHello] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1738. {
  1739. if (data)
  1740. {
  1741. if ([self handleError:data])
  1742. {
  1743. block(data, nil);
  1744. }
  1745. }
  1746. else
  1747. {
  1748. block(nil, error);
  1749. }
  1750. }];
  1751. }
  1752. /// 主播端 - 主播获取自己的-互动礼物列表
  1753. /// - Parameters:
  1754. /// - params: 参数
  1755. /// - block: 回调
  1756. - (void)getGiftMenuDataWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block {
  1757. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_InteractGifts] withParams:params withMethodType:Post andBlock:^(id data, NSError *error){
  1758. if (data)
  1759. {
  1760. if ([self handleError:data])
  1761. {
  1762. block(data, nil);
  1763. }
  1764. }
  1765. else
  1766. {
  1767. block(nil, error);
  1768. }
  1769. }];
  1770. }
  1771. /// 直播间 - 主播端 - 允许联线状态变更
  1772. /// - Parameters:
  1773. /// - params: 参数
  1774. /// - block: 回调
  1775. - (void)toChangeTheLiveAllowLinkStatusWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1776. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_ManageAllowLinkChange] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1777. {
  1778. if (data)
  1779. {
  1780. if ([self handleError:data])
  1781. {
  1782. block(data, nil);
  1783. }
  1784. }
  1785. else
  1786. {
  1787. block(nil, error);
  1788. }
  1789. }];
  1790. }
  1791. /// 主播端 - 设置互动礼物-开关
  1792. /// - Parameters:
  1793. /// - params: 参数
  1794. /// - block: 回调
  1795. - (void)setGiftMenuOpenWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block {
  1796. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_InterractGiftSwitch] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1797. {
  1798. if (data)
  1799. {
  1800. if ([self handleError:data])
  1801. {
  1802. block(data, nil);
  1803. }
  1804. }
  1805. else
  1806. {
  1807. block(nil, error);
  1808. }
  1809. }];
  1810. }
  1811. /// 主播端 - 设置互动礼物
  1812. /// - Parameters:
  1813. /// - params: 参数
  1814. /// - block: 回调
  1815. - (void)setGiftMenuWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block {
  1816. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_InterractGiftSet] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1817. {
  1818. if (data)
  1819. {
  1820. if ([self handleError:data])
  1821. {
  1822. block(data, nil);
  1823. }
  1824. }
  1825. else
  1826. {
  1827. block(nil, error);
  1828. }
  1829. }];
  1830. }
  1831. /// 主播端 - 互动礼物池列表
  1832. /// - Parameters:
  1833. /// - params: 参数
  1834. /// - block: 回调
  1835. - (void)getGiftMenuPoolWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block {
  1836. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_InterractGiftPool] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1837. {
  1838. if (data)
  1839. {
  1840. if ([self handleError:data])
  1841. {
  1842. block(data, nil);
  1843. }
  1844. }
  1845. else
  1846. {
  1847. block(nil, error);
  1848. }
  1849. }];
  1850. }
  1851. /// 主播端 - 设置互动礼物-删除
  1852. /// - Parameters:
  1853. /// - params: 参数
  1854. /// - block: 回调
  1855. - (void)deleteGiftMenuWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block {
  1856. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_InterractGiftRemove] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1857. {
  1858. if (data)
  1859. {
  1860. if ([self handleError:data])
  1861. {
  1862. block(data, nil);
  1863. }
  1864. }
  1865. else
  1866. {
  1867. block(nil, error);
  1868. }
  1869. }];
  1870. }
  1871. /// 用户端 - 用户获取主播的-互动礼物列表
  1872. /// - Parameters:
  1873. /// - params: 参数
  1874. /// - block: 回调
  1875. - (void)getAnchorGiftMenuDataWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block {
  1876. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_InterractAnchorGifts] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1877. {
  1878. if (data)
  1879. {
  1880. if ([self handleError:data])
  1881. {
  1882. block(data, nil);
  1883. }
  1884. }
  1885. else
  1886. {
  1887. block(nil, error);
  1888. }
  1889. }];
  1890. }
  1891. /// 检查用户是否已经关注指定用户列表
  1892. /// - Parameters:
  1893. /// - params: 参数
  1894. /// - block: 回调
  1895. - (void)toCheckTheContactFollowStatusWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1896. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_CheckContactFollow] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1897. {
  1898. if (data)
  1899. {
  1900. if ([self handleError:data])
  1901. {
  1902. block(data, nil);
  1903. }
  1904. }
  1905. else
  1906. {
  1907. block(nil, error);
  1908. }
  1909. }];
  1910. }
  1911. #pragma mark =========== Robot ============
  1912. /// 机器人飘屏 - 飘屏列表
  1913. /// - Parameters:
  1914. /// - params: 参数
  1915. /// - block: 回调
  1916. - (void)toGetTheRobotScreenListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1917. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_RobotScreen] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1918. {
  1919. if (data)
  1920. {
  1921. if ([self handleError:data])
  1922. {
  1923. block(data, nil);
  1924. }
  1925. }
  1926. else
  1927. {
  1928. block(nil, error);
  1929. }
  1930. }];
  1931. }
  1932. #pragma mark =========== Wish List ============
  1933. /// 用户端 - 获取主播正在进行的心愿单
  1934. /// - Parameters:
  1935. /// - params: 参数
  1936. /// - block: 回调
  1937. - (void)toGetOnGoingWishGiftWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1938. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_TheGiftOnGoing] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1939. {
  1940. if (data)
  1941. {
  1942. if ([self handleError:data])
  1943. {
  1944. block(data, nil);
  1945. }
  1946. }
  1947. else
  1948. {
  1949. block(nil, error);
  1950. }
  1951. }];
  1952. }
  1953. /// 主播端 - 设置心愿
  1954. /// - Parameters:
  1955. /// - params: 参数
  1956. /// - block: 回调
  1957. - (void)toCreateWishGiftWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1958. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_TheGiftCreate] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1959. {
  1960. if (data)
  1961. {
  1962. if ([self handleError:data])
  1963. {
  1964. block(data, nil);
  1965. }
  1966. }
  1967. else
  1968. {
  1969. block(nil, error);
  1970. }
  1971. }];
  1972. }
  1973. /// 主播端 - 获取心愿单列表
  1974. /// - Parameters:
  1975. /// - params: 参数
  1976. /// - block: 回调
  1977. - (void)toGetWishGiftConfigWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1978. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_TheGiftWishList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1979. {
  1980. if (data)
  1981. {
  1982. if ([self handleError:data])
  1983. {
  1984. block(data, nil);
  1985. }
  1986. }
  1987. else
  1988. {
  1989. block(nil, error);
  1990. }
  1991. }];
  1992. }
  1993. /// 主播端 - 取消心愿
  1994. /// - Parameters:
  1995. /// - params: 参数
  1996. /// - block: 回调
  1997. - (void)toCancelWishGiftWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  1998. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_WishGiftCancel] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  1999. {
  2000. if (data)
  2001. {
  2002. if ([self handleError:data])
  2003. {
  2004. block(data, nil);
  2005. }
  2006. }
  2007. else
  2008. {
  2009. block(nil, error);
  2010. }
  2011. }];
  2012. }
  2013. /// 获取主播已完成的心愿
  2014. /// - Parameters:
  2015. /// - params: 参数
  2016. /// - block: 回调
  2017. - (void)toGetWishRecordListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2018. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_WishRecordList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2019. {
  2020. if (data)
  2021. {
  2022. if ([self handleError:data])
  2023. {
  2024. block(data, nil);
  2025. }
  2026. }
  2027. else
  2028. {
  2029. block(nil, error);
  2030. }
  2031. }];
  2032. }
  2033. /// 用户端 - 获取主播被助力过的心愿单
  2034. /// - Parameters:
  2035. /// - params: 参数
  2036. /// - block: 回调
  2037. - (void)toGetWishRecordAboutAnchorWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2038. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_WishAssisted] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2039. {
  2040. if (data)
  2041. {
  2042. if ([self handleError:data])
  2043. {
  2044. block(data, nil);
  2045. }
  2046. }
  2047. else
  2048. {
  2049. block(nil, error);
  2050. }
  2051. }];
  2052. }
  2053. /// 用户端 - 获取主播正在进行的心愿单.2
  2054. /// - Parameters:
  2055. /// - params: 参数
  2056. /// - block: 回调
  2057. - (void)toGetWithGiftOngoingTwoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2058. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_TheGiftOnGoingTwo] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2059. {
  2060. if (data)
  2061. {
  2062. if ([self handleError:data])
  2063. {
  2064. block(data, nil);
  2065. }
  2066. }
  2067. else
  2068. {
  2069. block(nil, error);
  2070. }
  2071. }];
  2072. }
  2073. #pragma mark - v2.0.2
  2074. /// 直播心愿 - 获取房间心愿数据
  2075. /// - Parameters:
  2076. /// - params: 参数
  2077. /// - block: 回调
  2078. - (void)getDesireDataWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block {
  2079. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_getDesire] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2080. {
  2081. if (data)
  2082. {
  2083. if ([self handleError:data])
  2084. {
  2085. block(data, nil);
  2086. }
  2087. }
  2088. else
  2089. {
  2090. block(nil, error);
  2091. }
  2092. }];
  2093. }
  2094. /// 主播端 - 礼物心愿V2 - 配置列表
  2095. /// - Parameters:
  2096. /// - params: 参数
  2097. /// - block: 回调
  2098. - (void)getDesireGiftListDataWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block {
  2099. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_desireList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2100. {
  2101. if (data)
  2102. {
  2103. if ([self handleError:data])
  2104. {
  2105. block(data, nil);
  2106. }
  2107. }
  2108. else
  2109. {
  2110. block(nil, error);
  2111. }
  2112. }];
  2113. }
  2114. /// 礼物心愿V2 - 已选择列表
  2115. /// - Parameters:
  2116. /// - params: 参数
  2117. /// - block: 回调
  2118. - (void)getDesireChooseDataWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block {
  2119. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_desireChoose] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2120. {
  2121. if (data)
  2122. {
  2123. if ([self handleError:data])
  2124. {
  2125. block(data, nil);
  2126. }
  2127. }
  2128. else
  2129. {
  2130. block(nil, error);
  2131. }
  2132. }];
  2133. }
  2134. /// 主播端 - 直播心愿 - 设置
  2135. /// - Parameters:
  2136. /// - params: 参数
  2137. /// - block: 回调
  2138. - (void)setDesireWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block {
  2139. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_desireSetting] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2140. {
  2141. if (data)
  2142. {
  2143. if ([self handleError:data])
  2144. {
  2145. block(data, nil);
  2146. }
  2147. }
  2148. else
  2149. {
  2150. block(nil, error);
  2151. }
  2152. }];
  2153. }
  2154. /// 直播心愿 - 主播端 - 关闭心愿单
  2155. /// - Parameters:
  2156. /// - params: 参数
  2157. /// - block: 回调
  2158. - (void)closeDesireWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block {
  2159. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_desireClose] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2160. {
  2161. if (data)
  2162. {
  2163. if ([self handleError:data])
  2164. {
  2165. block(data, nil);
  2166. }
  2167. }
  2168. else
  2169. {
  2170. block(nil, error);
  2171. }
  2172. }];
  2173. }
  2174. /// 直播房心愿 - 排行榜 - 基础列表
  2175. /// - Parameters:
  2176. /// - params: 参数
  2177. /// - block: 回调
  2178. - (void)getDesireRankWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block {
  2179. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_desireRank] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2180. {
  2181. if (data)
  2182. {
  2183. if ([self handleError:data])
  2184. {
  2185. block(data, nil);
  2186. }
  2187. }
  2188. else
  2189. {
  2190. block(nil, error);
  2191. }
  2192. }];
  2193. }
  2194. /// 直播心愿 - 直播房心愿 - 填充排行榜
  2195. /// - Parameters:
  2196. /// - params: 参数
  2197. /// - block: 回调
  2198. - (void)getDesireRankFillDataWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block {
  2199. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_desireRankFill] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2200. {
  2201. if (data)
  2202. {
  2203. if ([self handleError:data])
  2204. {
  2205. block(data, nil);
  2206. }
  2207. }
  2208. else
  2209. {
  2210. block(nil, error);
  2211. }
  2212. }];
  2213. }
  2214. #pragma mark =========== Live Center ============
  2215. /// 主播端 - 直播间收到的门票
  2216. /// - Parameters:
  2217. /// - params: 参数
  2218. /// - block: 回调
  2219. - (void)theLiveCenterAboutTicketWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2220. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveCenterTicket] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2221. {
  2222. if (data)
  2223. {
  2224. if ([self handleError:data])
  2225. {
  2226. block(data, nil);
  2227. }
  2228. }
  2229. else
  2230. {
  2231. block(nil, error);
  2232. }
  2233. }];
  2234. }
  2235. /// 主播端 - 直播中的数据
  2236. /// - Parameters:
  2237. /// - params: 参数
  2238. /// - block: 回调
  2239. - (void)theLiveCenterInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2240. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveCenterInfo] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2241. {
  2242. if (data)
  2243. {
  2244. if ([self handleError:data])
  2245. {
  2246. block(data, nil);
  2247. }
  2248. }
  2249. else
  2250. {
  2251. block(nil, error);
  2252. }
  2253. }];
  2254. }
  2255. /// 主播端 - 直播间完成的心愿单列表
  2256. /// - Parameters:
  2257. /// - params: 参数
  2258. /// - block: 回调
  2259. - (void)theLiveCenterAboutGiftWishWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2260. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveCenterGiftWish] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2261. {
  2262. if (data)
  2263. {
  2264. if ([self handleError:data])
  2265. {
  2266. block(data, nil);
  2267. }
  2268. }
  2269. else
  2270. {
  2271. block(nil, error);
  2272. }
  2273. }];
  2274. }
  2275. /// 主播端 - 赠送礼物的用户
  2276. /// - Parameters:
  2277. /// - params: 参数
  2278. /// - block: 回调
  2279. - (void)theLiveCenterAboutGiftUserWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2280. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveCenterGiftUser] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2281. {
  2282. if (data)
  2283. {
  2284. if ([self handleError:data])
  2285. {
  2286. block(data, nil);
  2287. }
  2288. }
  2289. else
  2290. {
  2291. block(nil, error);
  2292. }
  2293. }];
  2294. }
  2295. /// 主播端 - 直播间收到的礼物列表
  2296. /// - Parameters:
  2297. /// - params: 参数
  2298. /// - block: 回调
  2299. - (void)theLiveCenterAboutGiftListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2300. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveCenterGiftList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2301. {
  2302. if (data)
  2303. {
  2304. if ([self handleError:data])
  2305. {
  2306. block(data, nil);
  2307. }
  2308. }
  2309. else
  2310. {
  2311. block(nil, error);
  2312. }
  2313. }];
  2314. }
  2315. #pragma mark =========== Live Gift ============
  2316. /// 用户端 - 直播间礼物
  2317. /// - Parameters:
  2318. /// - params: 参数
  2319. /// - block: 回调
  2320. - (void)toGetLiveGiftListWithParams:(id)params andBlock:(void (^)(id _Nullable data, NSError *error))block{
  2321. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveGiftV2List] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2322. {
  2323. if (data)
  2324. {
  2325. if ([self handleError:data])
  2326. {
  2327. block(data, nil);
  2328. }
  2329. }
  2330. else
  2331. {
  2332. block(nil, error);
  2333. }
  2334. }];
  2335. }
  2336. /// 用户端 - 直播间送礼物
  2337. /// - Parameters:
  2338. /// - params: 参数
  2339. /// - block: 回调
  2340. - (void)toGivingGiftAboutLiveWithParams:(id)params andBlock:(void (^)(id _Nullable data, NSError *error))block{
  2341. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveGiftGiving] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2342. {
  2343. if (data)
  2344. {
  2345. if ([self handleError:data])
  2346. {
  2347. block(data, nil);
  2348. }
  2349. }
  2350. else
  2351. {
  2352. block(nil, error);
  2353. }
  2354. }];
  2355. }
  2356. #pragma mark =========== App ============
  2357. /// APP版本 - 检查当前APP版本
  2358. /// - Parameters:
  2359. /// - params: 参数
  2360. /// - block: 回调
  2361. - (void)toCheckAppVersionWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2362. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_VersionCheck] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2363. {
  2364. if (data)
  2365. {
  2366. if ([self handleError:data])
  2367. {
  2368. block(data, nil);
  2369. }
  2370. }
  2371. else
  2372. {
  2373. block(nil, error);
  2374. }
  2375. }];
  2376. }
  2377. /// APP功能区 - 列表信息
  2378. /// - Parameters:
  2379. /// - params: 参数
  2380. /// - block: 回调
  2381. - (void)toGetTheFunctionListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2382. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_FunctionalList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2383. {
  2384. if (data)
  2385. {
  2386. if ([self handleError:data])
  2387. {
  2388. block(data, nil);
  2389. }
  2390. }
  2391. else
  2392. {
  2393. block(nil, error);
  2394. }
  2395. }];
  2396. }
  2397. #pragma mark =========== About IM ============
  2398. /// 黑名单 - 移除
  2399. /// - Parameters:
  2400. /// - params: 参数
  2401. /// - block: 回调
  2402. - (void)toRemoveBlockWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2403. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_RemoveBlock] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2404. {
  2405. if (data)
  2406. {
  2407. if ([self handleError:data])
  2408. {
  2409. block(data, nil);
  2410. }
  2411. }
  2412. else
  2413. {
  2414. block(nil, error);
  2415. }
  2416. }];
  2417. }
  2418. /// 黑名单 - 列表
  2419. /// - Parameters:
  2420. /// - params: 参数
  2421. /// - block: 回调
  2422. - (void)getBlockListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2423. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_BlockList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2424. {
  2425. if (data)
  2426. {
  2427. if ([self handleError:data])
  2428. {
  2429. block(data, nil);
  2430. }
  2431. }
  2432. else
  2433. {
  2434. block(nil, error);
  2435. }
  2436. }];
  2437. }
  2438. /// 黑名单 - 添加
  2439. /// - Parameters:
  2440. /// - params: 参数
  2441. /// - block: 回调
  2442. - (void)toAddSomeOneForBlockWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2443. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_BlockAdd] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2444. {
  2445. if (data)
  2446. {
  2447. if ([self handleError:data])
  2448. {
  2449. block(data, nil);
  2450. }
  2451. }
  2452. else
  2453. {
  2454. block(nil, error);
  2455. }
  2456. }];
  2457. }
  2458. /// 联系页 - 关注接口
  2459. /// - Parameters:
  2460. /// - params: 参数
  2461. /// - block: 回调
  2462. - (void)toSubmitForFollowWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2463. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_FollowSubmit] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2464. {
  2465. if (data)
  2466. {
  2467. if ([self handleError:data])
  2468. {
  2469. block(data, nil);
  2470. }
  2471. }
  2472. else
  2473. {
  2474. block(nil, error);
  2475. }
  2476. }];
  2477. }
  2478. /// 联系页 - 关注设置信息
  2479. /// - Parameters:
  2480. /// - params: 参数
  2481. /// - block: 回调
  2482. - (void)toSettingInfoForFollowWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2483. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_FollowSet] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2484. {
  2485. if (data)
  2486. {
  2487. if ([self handleError:data])
  2488. {
  2489. block(data, nil);
  2490. }
  2491. }
  2492. else
  2493. {
  2494. block(nil, error);
  2495. }
  2496. }];
  2497. }
  2498. /// 联系页 - 关注列表
  2499. /// - Parameters:
  2500. /// - params: 参数
  2501. /// - block: 回调
  2502. - (void)getFollowListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2503. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_FollowList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2504. {
  2505. if (data)
  2506. {
  2507. if ([self handleError:data])
  2508. {
  2509. block(data, nil);
  2510. }
  2511. }
  2512. else
  2513. {
  2514. block(nil, error);
  2515. }
  2516. }];
  2517. }
  2518. /// 踢出粉丝,移除对方的关注
  2519. /// - Parameters:
  2520. /// - params: 参数
  2521. /// - block: 回调
  2522. - (void)toKickSomeOneFormFollowWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2523. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_FollowKick] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2524. {
  2525. if (data)
  2526. {
  2527. if ([self handleError:data])
  2528. {
  2529. block(data, nil);
  2530. }
  2531. }
  2532. else
  2533. {
  2534. block(nil, error);
  2535. }
  2536. }];
  2537. }
  2538. /// 联系页 - 好友列表
  2539. /// - Parameters:
  2540. /// - params: 参数
  2541. /// - block: 回调
  2542. - (void)getFollowFriendListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2543. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_FollowFriend] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2544. {
  2545. if (data)
  2546. {
  2547. if ([self handleError:data])
  2548. {
  2549. block(data, nil);
  2550. }
  2551. }
  2552. else
  2553. {
  2554. block(nil, error);
  2555. }
  2556. }];
  2557. }
  2558. /// 联系页 - 粉丝列表
  2559. /// - Parameters:
  2560. /// - params: 参数
  2561. /// - block: 回调
  2562. - (void)getFollowFansListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2563. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_FansList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2564. {
  2565. if (data)
  2566. {
  2567. if ([self handleError:data])
  2568. {
  2569. block(data, nil);
  2570. }
  2571. }
  2572. else
  2573. {
  2574. block(nil, error);
  2575. }
  2576. }];
  2577. }
  2578. /// 黑名单 - 检查是否黑名单用户
  2579. /// - Parameters:
  2580. /// - params: 参数
  2581. /// - block: 回调
  2582. - (void)toCheckTheUserIsBlackWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2583. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_BlockCheck] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2584. {
  2585. if (data)
  2586. {
  2587. if ([self handleError:data])
  2588. {
  2589. block(data, nil);
  2590. }
  2591. }
  2592. else
  2593. {
  2594. block(nil, error);
  2595. }
  2596. }];
  2597. }
  2598. /// 联系页 - 粉丝新成员已读
  2599. /// - Parameters:
  2600. /// - params: 参数
  2601. /// - block: 回调
  2602. - (void)theNewFansAlreadyReadWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2603. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_NewFansRead] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2604. {
  2605. if (data)
  2606. {
  2607. if ([self handleError:data])
  2608. {
  2609. block(data, nil);
  2610. }
  2611. }
  2612. else
  2613. {
  2614. block(nil, error);
  2615. }
  2616. }];
  2617. }
  2618. /// 检查用户是否已经关注指定用户列表
  2619. /// - Parameters:
  2620. /// - params: 参数
  2621. /// - block: 回调
  2622. - (void)toCheckTheContactFollowInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2623. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_ContactFollowCheck] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2624. {
  2625. if (data)
  2626. {
  2627. if ([self handleError:data])
  2628. {
  2629. block(data, nil);
  2630. }
  2631. }
  2632. else
  2633. {
  2634. block(nil, error);
  2635. }
  2636. }];
  2637. }
  2638. #pragma mark =========== Feedback ============
  2639. /// 用户举报 - 提交
  2640. /// - Parameters:
  2641. /// - params: 参数
  2642. /// - block: 回调
  2643. - (void)toSubmitFeedbackReportWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2644. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_RepoetSubmit] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2645. {
  2646. if (data)
  2647. {
  2648. if ([self handleError:data])
  2649. {
  2650. block(data, nil);
  2651. }
  2652. }
  2653. else
  2654. {
  2655. block(nil, error);
  2656. }
  2657. }];
  2658. }
  2659. /// App问题反馈 - 提交
  2660. /// - Parameters:
  2661. /// - params: 参数
  2662. /// - block: 回调
  2663. - (void)toSubmitFeedbackIssueWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2664. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_IssueSubmit] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2665. {
  2666. if (data)
  2667. {
  2668. if ([self handleError:data])
  2669. {
  2670. block(data, nil);
  2671. }
  2672. }
  2673. else
  2674. {
  2675. block(nil, error);
  2676. }
  2677. }];
  2678. }
  2679. /// 直播间 - 分享短连接转换
  2680. /// - Parameters:
  2681. /// - params: 参数
  2682. /// - block: 回调
  2683. - (void)toGetShareSlinkWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2684. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LiveShareSlink] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2685. {
  2686. if (data)
  2687. {
  2688. if ([self handleError:data])
  2689. {
  2690. block(data, nil);
  2691. }
  2692. }
  2693. else
  2694. {
  2695. block(nil, error);
  2696. }
  2697. }];
  2698. }
  2699. /// 直播间 - 汇报 (与每日分享 - 汇报 功能相同)
  2700. /// - Parameters:
  2701. /// - params: 参数
  2702. /// - block: 回调
  2703. - (void)toReportTheShareStatusWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2704. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_ShareShare] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2705. {
  2706. if (data)
  2707. {
  2708. if ([self handleError:data])
  2709. {
  2710. block(data, nil);
  2711. }
  2712. }
  2713. else
  2714. {
  2715. block(nil, error);
  2716. }
  2717. }];
  2718. }
  2719. #pragma mark =========== About Country ============
  2720. /// 国家 - 地区列表
  2721. /// - Parameters:
  2722. /// - params: 参数
  2723. /// - block: 回调
  2724. - (void)getCountryAndRegionListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2725. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_CountryList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2726. {
  2727. if (data)
  2728. {
  2729. if ([self handleError:data])
  2730. {
  2731. block(data, nil);
  2732. }
  2733. }
  2734. else
  2735. {
  2736. block(nil, error);
  2737. }
  2738. }];
  2739. }
  2740. /// 国家 - 电话区号列表
  2741. /// - Parameters:
  2742. /// - params: 参数
  2743. /// - block: 回调
  2744. - (void)getCountryMobileListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2745. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_CountryMobileList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2746. {
  2747. if (data)
  2748. {
  2749. if ([self handleError:data])
  2750. {
  2751. block(data, nil);
  2752. }
  2753. }
  2754. else
  2755. {
  2756. block(nil, error);
  2757. }
  2758. }];
  2759. }
  2760. /// 基础模块 - Banner信息
  2761. /// - Parameters:
  2762. /// - params: 1=首页图片,2=直播间图片,3=New页图片,4=启动页图片,5=开播页图片,6=语音列表图片
  2763. /// - block: 回调
  2764. - (void)getBaseBannerListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2765. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",KNetPath_Code_Banner] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2766. {
  2767. if (data)
  2768. {
  2769. if ([self handleError:data])
  2770. {
  2771. block(data, nil);
  2772. }
  2773. }
  2774. else
  2775. {
  2776. block(nil, error);
  2777. }
  2778. }];
  2779. }
  2780. /// 基础存储列表信息
  2781. /// - Parameters:
  2782. /// - params: 参数
  2783. /// - block: 回调
  2784. - (void)toGetTheBaseStoreListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2785. // 定义本接口缓存的有效时长:2小时
  2786. const static NSTimeInterval kRequestBaseStoreListCacheDuration = 2 * 3600;
  2787. if (kHttpManager.responseCacheDict[kNetPath_Code_BaseStoreList]) {
  2788. MOApiResponseCacheModel *cacheModel = kHttpManager.responseCacheDict[kNetPath_Code_BaseStoreList];
  2789. NSTimeInterval nowTime = [[NSDate date] timeIntervalSince1970];
  2790. if (nowTime < cacheModel.responseTime + kRequestBaseStoreListCacheDuration) {
  2791. // 读取缓存数据,主线程返回
  2792. dispatch_async(dispatch_get_main_queue(), ^{
  2793. block(cacheModel.responseData, nil);
  2794. });
  2795. return;
  2796. }
  2797. }
  2798. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_BaseStoreList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2799. {
  2800. if (data)
  2801. {
  2802. if ([self handleError:data])
  2803. {
  2804. if (kCode_Success){
  2805. // 接口数据业务正常返回,缓存数据
  2806. MOBaseResData *baseData = [MOBaseResData modelObjectWithDictionary:data[@"data"]];
  2807. if(baseData.baseInterrupt.prop &&
  2808. baseData.baseInterrupt.gift &&
  2809. baseData.baseInterrupt.level &&
  2810. baseData.baseInterrupt.medal &&
  2811. baseData.baseInterrupt.vip){
  2812. [kHttpManager cacheApiData:data key:kNetPath_Code_BaseStoreList];
  2813. }
  2814. }
  2815. block(data, nil);
  2816. }
  2817. }
  2818. else
  2819. {
  2820. block(nil, error);
  2821. }
  2822. }];
  2823. }
  2824. /// 基础模块 - 倒计时相关
  2825. /// - Parameters:
  2826. /// - params: 参数
  2827. /// - block: 回调
  2828. - (void)toGetTheBaseCountDownListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2829. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_BaseCountDownList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2830. {
  2831. if (data)
  2832. {
  2833. if ([self handleError:data])
  2834. {
  2835. block(data, nil);
  2836. }
  2837. }
  2838. else
  2839. {
  2840. block(nil, error);
  2841. }
  2842. }];
  2843. }
  2844. /// 美颜物料相关控制器
  2845. /// - Parameters:
  2846. /// - params: 参数
  2847. /// - block: 回调
  2848. - (void)toGetTheBaseMaterialBeautyWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2849. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_BaseMaterialHuoShan] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2850. {
  2851. if (data)
  2852. {
  2853. if ([self handleError:data])
  2854. {
  2855. block(data, nil);
  2856. }
  2857. }
  2858. else
  2859. {
  2860. block(nil, error);
  2861. }
  2862. }];
  2863. }
  2864. #pragma mark =========== About User ============
  2865. /// 用户信息 - 获得当前登录用户信息
  2866. /// - Parameters:
  2867. /// - params: 参数
  2868. /// - block: 回调
  2869. - (void)getMeUserInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2870. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",KNetPath_Code_UserInfoMe] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2871. {
  2872. if (data)
  2873. {
  2874. if ([self handleError:data])
  2875. {
  2876. block(data, nil);
  2877. }
  2878. }
  2879. else
  2880. {
  2881. block(nil, error);
  2882. }
  2883. }];
  2884. }
  2885. /// 根据用户ID列表,查询用户数据
  2886. /// - Parameters:
  2887. /// - params: 参数
  2888. /// - block: 回调
  2889. - (void)getUserInfoListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2890. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_UserInfoList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2891. {
  2892. if (data)
  2893. {
  2894. if ([self handleError:data])
  2895. {
  2896. block(data, nil);
  2897. }
  2898. }
  2899. else
  2900. {
  2901. block(nil, error);
  2902. }
  2903. }];
  2904. }
  2905. /// 根据用户编号列表,查询用户数据
  2906. /// - Parameters:
  2907. /// - params: 参数
  2908. /// - block: 回调
  2909. - (void)getUserInfoByNoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2910. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_UserInfoByNo] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2911. {
  2912. if (data)
  2913. {
  2914. if ([self handleError:data])
  2915. {
  2916. block(data, nil);
  2917. }
  2918. }
  2919. else
  2920. {
  2921. block(nil, error);
  2922. }
  2923. }];
  2924. }
  2925. /// diamond
  2926. /// - Parameters:
  2927. /// - params: 参数
  2928. /// - block: 回调
  2929. - (void)testWalletGetDiamondWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2930. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_TestDiamond] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2931. {
  2932. if (data)
  2933. {
  2934. if ([self handleError:data])
  2935. {
  2936. block(data, nil);
  2937. }
  2938. }
  2939. else
  2940. {
  2941. block(nil, error);
  2942. }
  2943. }];
  2944. }
  2945. /// 用户礼物 - 接收的礼物
  2946. /// - Parameters:
  2947. /// - params: 参数
  2948. /// - block: 回调
  2949. - (void)theUserReceiveGiftListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2950. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_UserGiftReceive] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2951. {
  2952. if (data)
  2953. {
  2954. if ([self handleError:data])
  2955. {
  2956. block(data, nil);
  2957. }
  2958. }
  2959. else
  2960. {
  2961. block(nil, error);
  2962. }
  2963. }];
  2964. }
  2965. /// 邀请用户 - 我的邀请信息
  2966. /// - Parameters:
  2967. /// - params: 参数
  2968. /// - block: 回调
  2969. - (void)getMyInviteDataInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2970. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_UserInfoInviteData] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2971. {
  2972. if (data)
  2973. {
  2974. if ([self handleError:data])
  2975. {
  2976. block(data, nil);
  2977. }
  2978. }
  2979. else
  2980. {
  2981. block(nil, error);
  2982. }
  2983. }];
  2984. }
  2985. /// 用户信息 - 设置邀请人
  2986. /// - Parameters:
  2987. /// - params: 参数
  2988. /// - block: 回调
  2989. - (void)toSetTheLeaderInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  2990. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_UserInfoLeader] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  2991. {
  2992. if (data)
  2993. {
  2994. if ([self handleError:data])
  2995. {
  2996. block(data, nil);
  2997. }
  2998. }
  2999. else
  3000. {
  3001. block(nil, error);
  3002. }
  3003. }];
  3004. }
  3005. /// 用户查询 - 查询用户
  3006. /// - Parameters:
  3007. /// - params: 参数
  3008. /// - block: 回调
  3009. - (void)toSearchTheUserInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3010. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_UserInfoSearch] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3011. {
  3012. if (data)
  3013. {
  3014. if ([self handleError:data])
  3015. {
  3016. block(data, nil);
  3017. }
  3018. }
  3019. else
  3020. {
  3021. block(nil, error);
  3022. }
  3023. }];
  3024. }
  3025. /// 用户等级 - 等级信息
  3026. /// - Parameters:
  3027. /// - params: 参数
  3028. /// - block: 回调
  3029. - (void)toGetUserInfoAboutLevelWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3030. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_UserInfoLevel] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3031. {
  3032. if (data)
  3033. {
  3034. if ([self handleError:data])
  3035. {
  3036. block(data, nil);
  3037. }
  3038. }
  3039. else
  3040. {
  3041. block(nil, error);
  3042. }
  3043. }];
  3044. }
  3045. /// 用户事件 - 事件列表
  3046. /// - Parameters:
  3047. /// - params: 参数
  3048. /// - block: 回调
  3049. - (void)toGetUserEventListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3050. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_UserEventList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3051. {
  3052. if (data)
  3053. {
  3054. if ([self handleError:data])
  3055. {
  3056. block(data, nil);
  3057. }
  3058. }
  3059. else
  3060. {
  3061. block(nil, error);
  3062. }
  3063. }];
  3064. }
  3065. /// 用户事件 - ACK信息
  3066. /// - Parameters:
  3067. /// - params: 参数
  3068. /// - block: 回调
  3069. - (void)theUserEventAckWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3070. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_UserEventAck] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3071. {
  3072. if (data)
  3073. {
  3074. if ([self handleError:data])
  3075. {
  3076. block(data, nil);
  3077. }
  3078. }
  3079. else
  3080. {
  3081. block(nil, error);
  3082. }
  3083. }];
  3084. }
  3085. /// 用户安全 - 获取用户安全信息
  3086. /// - Parameters:
  3087. /// - params: 参数
  3088. /// - block: 回调
  3089. - (void)toGetTheUserSecurityInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3090. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_UserSecurityInfo] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3091. {
  3092. if (data)
  3093. {
  3094. if ([self handleError:data])
  3095. {
  3096. block(data, nil);
  3097. }
  3098. }
  3099. else
  3100. {
  3101. block(nil, error);
  3102. }
  3103. }];
  3104. }
  3105. /// 用户手机号码 - 换绑手机 - 发送原有手机验证码
  3106. /// - Parameters:
  3107. /// - params: 参数
  3108. /// - block: 回调
  3109. - (void)toSendTheUserOldMobileChangeCodleWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3110. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_UserMobileChangeGetCode] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3111. {
  3112. if (data)
  3113. {
  3114. if ([self handleError:data])
  3115. {
  3116. block(data, nil);
  3117. }
  3118. }
  3119. else
  3120. {
  3121. block(nil, error);
  3122. }
  3123. }];
  3124. }
  3125. /// 用户手机号码 - 换绑手机 - 检验原有手机号码是否通过
  3126. /// - Parameters:
  3127. /// - params: 参数
  3128. /// - block: 回调
  3129. - (void)toCheckTheOldMobileCodeWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3130. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_UserMobileChangeCodeCheck] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3131. {
  3132. if (data)
  3133. {
  3134. if ([self handleError:data])
  3135. {
  3136. block(data, nil);
  3137. }
  3138. }
  3139. else
  3140. {
  3141. block(nil, error);
  3142. }
  3143. }];
  3144. }
  3145. /// 用户手机号码 - 换绑手机 - 发送新手机验证码
  3146. /// - Parameters:
  3147. /// - params: 参数
  3148. /// - block: 回调
  3149. - (void)toSendTheNewMobileCodeWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3150. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_UserMobileChangeSend] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3151. {
  3152. if (data)
  3153. {
  3154. if ([self handleError:data])
  3155. {
  3156. block(data, nil);
  3157. }
  3158. }
  3159. else
  3160. {
  3161. block(nil, error);
  3162. }
  3163. }];
  3164. }
  3165. /// 用户手机号码 - 换绑手机 - 绑定新手机
  3166. /// - Parameters:
  3167. /// - params: 参数
  3168. /// - block: 回调
  3169. - (void)toBingTheNewMobileWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3170. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_UserMobileChangeBind] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3171. {
  3172. if (data)
  3173. {
  3174. if ([self handleError:data])
  3175. {
  3176. block(data, nil);
  3177. }
  3178. }
  3179. else
  3180. {
  3181. block(nil, error);
  3182. }
  3183. }];
  3184. }
  3185. /// 用户邮箱 - 换绑邮箱 - 发送新邮箱验证码
  3186. /// - Parameters:
  3187. /// - params: 参数
  3188. /// - block: 回调
  3189. - (void)getTheNewEmailCodeWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3190. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_UserEmailChangeSend] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3191. {
  3192. if (data)
  3193. {
  3194. if ([self handleError:data])
  3195. {
  3196. block(data, nil);
  3197. }
  3198. }
  3199. else
  3200. {
  3201. block(nil, error);
  3202. }
  3203. }];
  3204. }
  3205. /// 用户邮箱 - 换绑邮箱 - 发送原有邮箱验证码
  3206. /// - Parameters:
  3207. /// - params: 参数
  3208. /// - block: 回调
  3209. - (void)getTheOldEmailCodeWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3210. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_UserGetOldEmailCode] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3211. {
  3212. if (data)
  3213. {
  3214. if ([self handleError:data])
  3215. {
  3216. block(data, nil);
  3217. }
  3218. }
  3219. else
  3220. {
  3221. block(nil, error);
  3222. }
  3223. }];
  3224. }
  3225. /// 用户邮箱 - 换绑邮箱 - 检验原有邮箱是否通过
  3226. /// - Parameters:
  3227. /// - params: 参数
  3228. /// - block: 回调
  3229. - (void)toCheckTheOldEmailCodeWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3230. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_UserCheckOldEmailCode] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3231. {
  3232. if (data)
  3233. {
  3234. if ([self handleError:data])
  3235. {
  3236. block(data, nil);
  3237. }
  3238. }
  3239. else
  3240. {
  3241. block(nil, error);
  3242. }
  3243. }];
  3244. }
  3245. /// 用户邮箱 - 换绑邮箱 - 提交换绑
  3246. /// - Parameters:
  3247. /// - params: 参数
  3248. /// - block: 回调
  3249. - (void)toBindTheNewEmailWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3250. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_UserChangeEmailBind] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3251. {
  3252. if (data)
  3253. {
  3254. if ([self handleError:data])
  3255. {
  3256. block(data, nil);
  3257. }
  3258. }
  3259. else
  3260. {
  3261. block(nil, error);
  3262. }
  3263. }];
  3264. }
  3265. /// 用户邮箱 - 绑定新邮箱 - 提交
  3266. /// - Parameters:
  3267. /// - params: 参数
  3268. /// - block: 回调
  3269. - (void)toSubmitTheEmailWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3270. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_UserEmailBindSubmit] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3271. {
  3272. if (data)
  3273. {
  3274. if ([self handleError:data])
  3275. {
  3276. block(data, nil);
  3277. }
  3278. }
  3279. else
  3280. {
  3281. block(nil, error);
  3282. }
  3283. }];
  3284. }
  3285. /// 用户邮箱 - 绑定新邮箱 - 发送验证码
  3286. /// - Parameters:
  3287. /// - params: 参数
  3288. /// - block: 回调
  3289. - (void)toBindEmailAndGetCodeWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3290. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_UserEmailBindCode] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3291. {
  3292. if (data)
  3293. {
  3294. if ([self handleError:data])
  3295. {
  3296. block(data, nil);
  3297. }
  3298. }
  3299. else
  3300. {
  3301. block(nil, error);
  3302. }
  3303. }];
  3304. }
  3305. /// 用户密码2 - 设置密码 - 校验验证码
  3306. /// - Parameters:
  3307. /// - params: 参数
  3308. /// - block: 回调
  3309. - (void)thePassword2SettingVerifyWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3310. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_UserPassword2SetVerify] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3311. {
  3312. if (data)
  3313. {
  3314. if ([self handleError:data])
  3315. {
  3316. block(data, nil);
  3317. }
  3318. }
  3319. else
  3320. {
  3321. block(nil, error);
  3322. }
  3323. }];
  3324. }
  3325. /// 用户密码2 - 设置密码 - 提交变更
  3326. /// - Parameters:
  3327. /// - params: 参数
  3328. /// - block: 回调
  3329. - (void)thePassword2SettingSubmitWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3330. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_UserPassword2SetSubmit] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3331. {
  3332. if (data)
  3333. {
  3334. if ([self handleError:data])
  3335. {
  3336. block(data, nil);
  3337. }
  3338. }
  3339. else
  3340. {
  3341. block(nil, error);
  3342. }
  3343. }];
  3344. }
  3345. /// 用户密码2 - 设置密码 - 发送验证
  3346. /// - Parameters:
  3347. /// - params: 参数
  3348. /// - block: 回调
  3349. - (void)thePassword2SettingSendCodeWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3350. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_UserPassword2SetSendCode] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3351. {
  3352. if (data)
  3353. {
  3354. if ([self handleError:data])
  3355. {
  3356. block(data, nil);
  3357. }
  3358. }
  3359. else
  3360. {
  3361. block(nil, error);
  3362. }
  3363. }];
  3364. }
  3365. /// 用户密码2 - 变更 - 校验原密码
  3366. /// - Parameters:
  3367. /// - params: 参数
  3368. /// - block: 回调
  3369. - (void)thePassword2ChangeVerifyWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3370. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_UserPassword2ChangeVerify] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3371. {
  3372. if (data)
  3373. {
  3374. if ([self handleError:data])
  3375. {
  3376. block(data, nil);
  3377. }
  3378. }
  3379. else
  3380. {
  3381. block(nil, error);
  3382. }
  3383. }];
  3384. }
  3385. /// 用户密码2 - 变更 - 提交变更
  3386. /// - Parameters:
  3387. /// - params: 参数
  3388. /// - block: 回调
  3389. - (void)thePassword2ChangeSubmitWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3390. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_UserPassword2ChangeSubmit] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3391. {
  3392. if (data)
  3393. {
  3394. if ([self handleError:data])
  3395. {
  3396. block(data, nil);
  3397. }
  3398. }
  3399. else
  3400. {
  3401. block(nil, error);
  3402. }
  3403. }];
  3404. }
  3405. #pragma mark =========== Image ============
  3406. - (void)getBaseOssAliWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3407. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_ImageOss] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3408. {
  3409. if (data)
  3410. {
  3411. if ([self handleError:data])
  3412. {
  3413. block(data, nil);
  3414. }
  3415. }
  3416. else
  3417. {
  3418. block(nil, error);
  3419. }
  3420. }];
  3421. }
  3422. - (void)getBaseOssS3WithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3423. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_ImageS3] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3424. {
  3425. if (data)
  3426. {
  3427. if ([self handleError:data])
  3428. {
  3429. block(data, nil);
  3430. }
  3431. }
  3432. else
  3433. {
  3434. block(nil, error);
  3435. }
  3436. }];
  3437. }
  3438. /// 上传图片(type如@"image/png",png是图片格式,否则上传失败)
  3439. /// @param imgData 图片
  3440. /// @param params 参数
  3441. /// @param type 类型
  3442. /// @param uploadProgressHandler 上传进度回调
  3443. /// @param block 回调
  3444. - (NSURLSessionDataTask *)sendSingleChatImage:(NSData *)imgData params:(id)params type:(NSString *)type andBaseUrl:(NSString *)baseUrl withUploadProgressHandler:(void (^)(NSProgress *))uploadProgressHandler andCompletionBlock:(void (^)(id, NSError *))block
  3445. {
  3446. NSURLSessionDataTask *task = [[MODynamicBaseUrlAPI clientWithBaseUrl:baseUrl] requestJsonDataWithPath:baseUrl withData:imgData withType:type?:@"image/jpg" withParams:params withMethodType:Put withProgressHandler:^(NSProgress *uploadProgress)
  3447. {
  3448. uploadProgressHandler?uploadProgressHandler(uploadProgress):nil;
  3449. }
  3450. andBlock:^(id data, NSError *error)
  3451. {
  3452. if (data)
  3453. {
  3454. block(data, nil);
  3455. }
  3456. else
  3457. {
  3458. block(nil, error);
  3459. }
  3460. }];
  3461. return task;
  3462. }
  3463. #pragma mark =========== About IM Token ============
  3464. /// 环信相关 - 获取环信的IM.Token
  3465. /// - Parameters:
  3466. /// - params: 参数
  3467. /// - block: 回调
  3468. - (void)toGetImTokenWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3469. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_ImToken] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3470. {
  3471. if (data)
  3472. {
  3473. if ([self handleError:data])
  3474. {
  3475. block(data, nil);
  3476. }
  3477. }
  3478. else
  3479. {
  3480. block(nil, error);
  3481. }
  3482. }];
  3483. }
  3484. /// 单聊信息 - 发送消息
  3485. /// - Parameters:
  3486. /// - params: 参数
  3487. /// - block: 回调
  3488. - (void)theChatSingleSubmitWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3489. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_SingleSubmit] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3490. {
  3491. if (data)
  3492. {
  3493. if ([self handleError:data])
  3494. {
  3495. block(data, nil);
  3496. }
  3497. }
  3498. else
  3499. {
  3500. block(nil, error);
  3501. }
  3502. }];
  3503. }
  3504. /// 单聊信息 - 获取会话信息
  3505. /// - Parameters:
  3506. /// - params: 参数
  3507. /// - block: 回调
  3508. - (void)toGetChatSingleInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3509. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_SingleGet] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3510. {
  3511. if (data)
  3512. {
  3513. if ([self handleError:data])
  3514. {
  3515. block(data, nil);
  3516. }
  3517. }
  3518. else
  3519. {
  3520. block(nil, error);
  3521. }
  3522. }];
  3523. }
  3524. /// IM相关 - 获取IM的Token (包括环信和腾讯)
  3525. /// - Parameters:
  3526. /// - params: 参数
  3527. /// - block: 回调
  3528. - (void)toGetChatTokenWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3529. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNewPath_Code_BaseChatToken] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3530. {
  3531. if (data)
  3532. {
  3533. if ([self handleError:data])
  3534. {
  3535. block(data, nil);
  3536. }
  3537. }
  3538. else
  3539. {
  3540. block(nil, error);
  3541. }
  3542. }];
  3543. }
  3544. /// 私聊标记上报
  3545. /// - Parameters:
  3546. /// - params: 参数
  3547. /// - block: 回调
  3548. - (void)reportPrivateChatWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block {
  3549. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_ChatReport] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3550. {
  3551. if (data)
  3552. {
  3553. if ([self handleError:data])
  3554. {
  3555. block(data, nil);
  3556. }
  3557. }
  3558. else
  3559. {
  3560. block(nil, error);
  3561. }
  3562. }];
  3563. }
  3564. #pragma mark =========== About Anchor ============
  3565. /// 主播信息 - 推荐主播列表
  3566. /// - Parameters:
  3567. /// - params: 参数
  3568. /// - block: 回调
  3569. - (void)getAnchorRecommendListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3570. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_AnchorRecommend] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3571. {
  3572. if (data)
  3573. {
  3574. if ([self handleError:data])
  3575. {
  3576. block(data, nil);
  3577. }
  3578. }
  3579. else
  3580. {
  3581. block(nil, error);
  3582. }
  3583. }];
  3584. }
  3585. /// 粉丝团相关 - 用户设置显示铭牌
  3586. /// - Parameters:
  3587. /// - params: 参数
  3588. /// - block: 回调
  3589. - (void)toSetFansNameplateWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3590. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_FansNameplate] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3591. {
  3592. if (data)
  3593. {
  3594. if ([self handleError:data])
  3595. {
  3596. block(data, nil);
  3597. }
  3598. }
  3599. else
  3600. {
  3601. block(nil, error);
  3602. }
  3603. }];
  3604. }
  3605. /// 粉丝团相关 - 获取粉丝团成员列表
  3606. /// - Parameters:
  3607. /// - params: 参数
  3608. /// - block: 回调
  3609. - (void)toGetFansMembersListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3610. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_FansMembers] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3611. {
  3612. if (data)
  3613. {
  3614. if ([self handleError:data])
  3615. {
  3616. block(data, nil);
  3617. }
  3618. }
  3619. else
  3620. {
  3621. block(nil, error);
  3622. }
  3623. }];
  3624. }
  3625. /// 粉丝团相关 - 离开粉丝团
  3626. /// - Parameters:
  3627. /// - params: 参数
  3628. /// - block: 回调
  3629. - (void)theFansToLeaveWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3630. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_FansLeave] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3631. {
  3632. if (data)
  3633. {
  3634. if ([self handleError:data])
  3635. {
  3636. block(data, nil);
  3637. }
  3638. }
  3639. else
  3640. {
  3641. block(nil, error);
  3642. }
  3643. }];
  3644. }
  3645. /// 主播粉丝团相关 - 编辑粉丝团信息
  3646. /// - Parameters:
  3647. /// - params: 参数
  3648. /// - block: 回调
  3649. - (void)toEditFansClubInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3650. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_FansClubEdit] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3651. {
  3652. if (data)
  3653. {
  3654. if ([self handleError:data])
  3655. {
  3656. block(data, nil);
  3657. }
  3658. }
  3659. else
  3660. {
  3661. block(nil, error);
  3662. }
  3663. }];
  3664. }
  3665. /// 主播粉丝团相关 - 创建粉丝团
  3666. /// - Parameters:
  3667. /// - params: 参数
  3668. /// - block: 回调
  3669. - (void)toCreateFansClubWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3670. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_FansClubCreate] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3671. {
  3672. if (data)
  3673. {
  3674. if ([self handleError:data])
  3675. {
  3676. block(data, nil);
  3677. }
  3678. }
  3679. else
  3680. {
  3681. block(nil, error);
  3682. }
  3683. }];
  3684. }
  3685. /// 粉丝团相关 - 加入的粉丝团
  3686. /// - Parameters:
  3687. /// - params: 参数
  3688. /// - block: 回调
  3689. - (void)toJoinsTheAnchorClubWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3690. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_ClubJoins] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3691. {
  3692. if (data)
  3693. {
  3694. if ([self handleError:data])
  3695. {
  3696. block(data, nil);
  3697. }
  3698. }
  3699. else
  3700. {
  3701. block(nil, error);
  3702. }
  3703. }];
  3704. }
  3705. /// 粉丝团相关 - 获取粉丝团信息
  3706. /// - Parameters:
  3707. /// - params: 参数
  3708. /// - block: 回调
  3709. - (void)toGetAnchorClubInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3710. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_ClubInfo] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3711. {
  3712. if (data)
  3713. {
  3714. if ([self handleError:data])
  3715. {
  3716. block(data, nil);
  3717. }
  3718. }
  3719. else
  3720. {
  3721. block(nil, error);
  3722. }
  3723. }];
  3724. }
  3725. /// 粉丝团 - 成员详情
  3726. /// - Parameters:
  3727. /// - params: 参数
  3728. /// - block: 回调
  3729. - (void)toGetTheFanMembersDetailWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3730. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_FansMemberDetail] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3731. {
  3732. if (data)
  3733. {
  3734. if ([self handleError:data])
  3735. {
  3736. block(data, nil);
  3737. }
  3738. }
  3739. else
  3740. {
  3741. block(nil, error);
  3742. }
  3743. }];
  3744. }
  3745. /// 粉丝团 - 粉丝团排行榜信息
  3746. /// - Parameters:
  3747. /// - params: 参数
  3748. /// - block: 回调
  3749. - (void)toGetTheFanClubRankListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3750. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_FansClubRank] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3751. {
  3752. if (data)
  3753. {
  3754. if ([self handleError:data])
  3755. {
  3756. block(data, nil);
  3757. }
  3758. }
  3759. else
  3760. {
  3761. block(nil, error);
  3762. }
  3763. }];
  3764. }
  3765. /// 主播申请 - 提交申请
  3766. /// - Parameters:
  3767. /// - params: 参数
  3768. /// - block: 回调
  3769. - (void)aboutAnchorToAppleyWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3770. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_AnchorApply] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3771. {
  3772. if (data)
  3773. {
  3774. if ([self handleError:data])
  3775. {
  3776. block(data, nil);
  3777. }
  3778. }
  3779. else
  3780. {
  3781. block(nil, error);
  3782. }
  3783. }];
  3784. }
  3785. /// 主播申请 - 申请中的信息
  3786. /// - Parameters:
  3787. /// - params: 参数
  3788. /// - block: 回调
  3789. - (void)aboutAnchorAppleyingWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3790. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_AnchorApplying] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3791. {
  3792. if (data)
  3793. {
  3794. if ([self handleError:data])
  3795. {
  3796. block(data, nil);
  3797. }
  3798. }
  3799. else
  3800. {
  3801. block(nil, error);
  3802. }
  3803. }];
  3804. }
  3805. /// 主播中心 - 直播时长
  3806. /// - Parameters:
  3807. /// - params: 参数
  3808. /// - block: 回调
  3809. - (void)aboutAnchorCenterDurationInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3810. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_AnchorCenterDuration] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3811. {
  3812. if (data)
  3813. {
  3814. if ([self handleError:data])
  3815. {
  3816. block(data, nil);
  3817. }
  3818. }
  3819. else
  3820. {
  3821. block(nil, error);
  3822. }
  3823. }];
  3824. }
  3825. /// 主播中心 - 收益统计
  3826. /// - Parameters:
  3827. /// - params: 参数
  3828. /// - block: 回调
  3829. - (void)aboutAnchorCenterIncomeInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3830. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_AnchorCenterIncome] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3831. {
  3832. if (data)
  3833. {
  3834. if ([self handleError:data])
  3835. {
  3836. block(data, nil);
  3837. }
  3838. }
  3839. else
  3840. {
  3841. block(nil, error);
  3842. }
  3843. }];
  3844. }
  3845. /// 主播时长任务 - 任务列表
  3846. /// - Parameters:
  3847. /// - params: 参数
  3848. /// - block: 回调
  3849. - (void)toGetTheAnchorTaskListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3850. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_AnchorTaskList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3851. {
  3852. if (data)
  3853. {
  3854. if ([self handleError:data])
  3855. {
  3856. block(data, nil);
  3857. }
  3858. }
  3859. else
  3860. {
  3861. block(nil, error);
  3862. }
  3863. }];
  3864. }
  3865. /// 主播时长任务 - 任务领取
  3866. /// - Parameters:
  3867. /// - params: 参数
  3868. /// - block: 回调
  3869. - (void)completeTheAnchorTaskWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3870. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_AnchorTaskComplete] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3871. {
  3872. if (data)
  3873. {
  3874. if ([self handleError:data])
  3875. {
  3876. block(data, nil);
  3877. }
  3878. }
  3879. else
  3880. {
  3881. block(nil, error);
  3882. }
  3883. }];
  3884. }
  3885. /// 主播中心 - 钱包信息
  3886. /// - Parameters:
  3887. /// - params: 参数
  3888. /// - block: 回调
  3889. - (void)toGetTheAnchorCenterWalletInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3890. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_AnchorCenterWallet] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3891. {
  3892. if (data)
  3893. {
  3894. if ([self handleError:data])
  3895. {
  3896. block(data, nil);
  3897. }
  3898. }
  3899. else
  3900. {
  3901. block(nil, error);
  3902. }
  3903. }];
  3904. }
  3905. #pragma mark =========== About Guild ============
  3906. /// 工会信息 - 工会引导页面
  3907. /// - Parameters:
  3908. /// - params: 参数
  3909. /// - block: 回调
  3910. - (void)toGetGuildAboutGuideWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3911. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_GuildAboutGuide] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3912. {
  3913. if (data)
  3914. {
  3915. if ([self handleError:data])
  3916. {
  3917. block(data, nil);
  3918. }
  3919. }
  3920. else
  3921. {
  3922. block(nil, error);
  3923. }
  3924. }];
  3925. }
  3926. /// 工会申请 - 校验手机验证码,获取申请Code
  3927. /// - Parameters:
  3928. /// - params: 参数
  3929. /// - block: 回调
  3930. - (void)toGetGuildApplyVerifyMobileWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3931. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_GuildVerify] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3932. {
  3933. if (data)
  3934. {
  3935. if ([self handleError:data])
  3936. {
  3937. block(data, nil);
  3938. }
  3939. }
  3940. else
  3941. {
  3942. block(nil, error);
  3943. }
  3944. }];
  3945. }
  3946. /// 工会申请 - 提交创建工会申请
  3947. /// - Parameters:
  3948. /// - params: 参数
  3949. /// - block: 回调
  3950. - (void)toSubmitGuildApplyWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3951. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_GuildApply] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3952. {
  3953. if (data)
  3954. {
  3955. if ([self handleError:data])
  3956. {
  3957. block(data, nil);
  3958. }
  3959. }
  3960. else
  3961. {
  3962. block(nil, error);
  3963. }
  3964. }];
  3965. }
  3966. /// 工会申请 - 获取手机验证码
  3967. /// - Parameters:
  3968. /// - params: 参数
  3969. /// - block: 回调
  3970. - (void)toGetGuildMobileCodeWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3971. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_GuildMobile] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3972. {
  3973. if (data)
  3974. {
  3975. if ([self handleError:data])
  3976. {
  3977. block(data, nil);
  3978. }
  3979. }
  3980. else
  3981. {
  3982. block(nil, error);
  3983. }
  3984. }];
  3985. }
  3986. /// 工会申请 - 获取审核中的申请信息
  3987. /// - Parameters:
  3988. /// - params: 参数
  3989. /// - block: 回调
  3990. - (void)toGuildApplyAuditingWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  3991. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_GuildAuditing] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  3992. {
  3993. if (data)
  3994. {
  3995. if ([self handleError:data])
  3996. {
  3997. block(data, nil);
  3998. }
  3999. }
  4000. else
  4001. {
  4002. block(nil, error);
  4003. }
  4004. }];
  4005. }
  4006. /// 公会2.0 - 提交创建公会申请
  4007. /// - Parameters:
  4008. /// - params: 参数
  4009. /// - block: 回调
  4010. - (void)theGuild2ToApplySubmit2WithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4011. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_GuildApplySubmit2] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4012. {
  4013. if (data)
  4014. {
  4015. if ([self handleError:data])
  4016. {
  4017. block(data, nil);
  4018. }
  4019. }
  4020. else
  4021. {
  4022. block(nil, error);
  4023. }
  4024. }];
  4025. }
  4026. #pragma mark =========== About Family ============
  4027. /// 家族成员 - 成员列表
  4028. /// - Parameters:
  4029. /// - params: 参数
  4030. /// - block: 回调
  4031. - (void)toGetFamilyMemberListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4032. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_FamilyMemberList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4033. {
  4034. if (data)
  4035. {
  4036. if ([self handleError:data])
  4037. {
  4038. block(data, nil);
  4039. }
  4040. }
  4041. else
  4042. {
  4043. block(nil, error);
  4044. }
  4045. }];
  4046. }
  4047. /// 家族成员 - 离开家族
  4048. /// - Parameters:
  4049. /// - params: 参数
  4050. /// - block: 回调
  4051. - (void)theMemberToLeaveFamilyWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4052. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_FamilyLeave] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4053. {
  4054. if (data)
  4055. {
  4056. if ([self handleError:data])
  4057. {
  4058. block(data, nil);
  4059. }
  4060. }
  4061. else
  4062. {
  4063. block(nil, error);
  4064. }
  4065. }];
  4066. }
  4067. /// 家族成员 - 踢出家族
  4068. /// - Parameters:
  4069. /// - params: 参数
  4070. /// - block: 回调
  4071. - (void)toKickSomeOneFormFamilyWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4072. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_FamilyKick] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4073. {
  4074. if (data)
  4075. {
  4076. if ([self handleError:data])
  4077. {
  4078. block(data, nil);
  4079. }
  4080. }
  4081. else
  4082. {
  4083. block(nil, error);
  4084. }
  4085. }];
  4086. }
  4087. /// 家族申请加入 - 申请加入
  4088. /// - Parameters:
  4089. /// - params: 参数
  4090. /// - block: 回调
  4091. - (void)submitJoinFamilyWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4092. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_FamilyJoinSub] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4093. {
  4094. if (data)
  4095. {
  4096. if ([self handleError:data])
  4097. {
  4098. block(data, nil);
  4099. }
  4100. }
  4101. else
  4102. {
  4103. block(nil, error);
  4104. }
  4105. }];
  4106. }
  4107. /// 家族申请审核 - 审核操作
  4108. /// - Parameters:
  4109. ///// - params: 参数
  4110. /// - block: 回调
  4111. - (void)toAuditJoinFamilyWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4112. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_FamilyAuditSub] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4113. {
  4114. if (data)
  4115. {
  4116. if ([self handleError:data])
  4117. {
  4118. block(data, nil);
  4119. }
  4120. }
  4121. else
  4122. {
  4123. block(nil, error);
  4124. }
  4125. }];
  4126. }
  4127. /// 家族申请审核 - 等待审核列表
  4128. /// - Parameters:
  4129. /// - params: 参数
  4130. /// - block: 回调
  4131. - (void)getAuditListAboutFamilyWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4132. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_FamilyAuditList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4133. {
  4134. if (data)
  4135. {
  4136. if ([self handleError:data])
  4137. {
  4138. block(data, nil);
  4139. }
  4140. }
  4141. else
  4142. {
  4143. block(nil, error);
  4144. }
  4145. }];
  4146. }
  4147. /// 家族信息 - 转移家族长
  4148. /// - Parameters:
  4149. /// - params: 参数
  4150. /// - block: 回调
  4151. - (void)toTransferFamilyWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4152. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_FamilyTransfer] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4153. {
  4154. if (data)
  4155. {
  4156. if ([self handleError:data])
  4157. {
  4158. block(data, nil);
  4159. }
  4160. }
  4161. else
  4162. {
  4163. block(nil, error);
  4164. }
  4165. }];
  4166. }
  4167. /// 家族信息 - 家族排行榜
  4168. /// - Parameters:
  4169. /// - params: 参数
  4170. /// - block: 回调
  4171. - (void)toGetTheFamilyRankWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4172. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_FamilyRank] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4173. {
  4174. if (data)
  4175. {
  4176. if ([self handleError:data])
  4177. {
  4178. block(data, nil);
  4179. }
  4180. }
  4181. else
  4182. {
  4183. block(nil, error);
  4184. }
  4185. }];
  4186. }
  4187. /// 家族信息 - 根据家族ID,查询家族详情
  4188. /// - Parameters:
  4189. /// - params: 参数
  4190. /// - block: 回调
  4191. - (void)toGetFamilyInfoDetailWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4192. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_FamilyDetail] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4193. {
  4194. if (data)
  4195. {
  4196. if ([self handleError:data])
  4197. {
  4198. block(data, nil);
  4199. }
  4200. }
  4201. else
  4202. {
  4203. block(nil, error);
  4204. }
  4205. }];
  4206. }
  4207. /// 家族信息 - 编辑家族加入状态
  4208. /// - Parameters:
  4209. /// - params: 参数
  4210. /// - block: 回调
  4211. - (void)toEditJoinStatusAboutFamilyWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4212. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_FamilyEditJoin] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4213. {
  4214. if (data)
  4215. {
  4216. if ([self handleError:data])
  4217. {
  4218. block(data, nil);
  4219. }
  4220. }
  4221. else
  4222. {
  4223. block(nil, error);
  4224. }
  4225. }];
  4226. }
  4227. /// 家族信息 - 编辑家族信息
  4228. /// - Parameters:
  4229. /// - params: 参数
  4230. /// - block: 回调
  4231. - (void)toEditFamilyInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4232. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_FamilyEditSub] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4233. {
  4234. if (data)
  4235. {
  4236. if ([self handleError:data])
  4237. {
  4238. block(data, nil);
  4239. }
  4240. }
  4241. else
  4242. {
  4243. block(nil, error);
  4244. }
  4245. }];
  4246. }
  4247. /// 家族创建申请 - 提交申请
  4248. /// - Parameters:
  4249. /// - params: 参数
  4250. /// - block: 回调
  4251. - (void)toCreateFamilyWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4252. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_FamilyCreate] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4253. {
  4254. if (data)
  4255. {
  4256. if ([self handleError:data])
  4257. {
  4258. block(data, nil);
  4259. }
  4260. }
  4261. else
  4262. {
  4263. block(nil, error);
  4264. }
  4265. }];
  4266. }
  4267. /// 家族创建申请 - 获取用户的申请
  4268. /// - Parameters:
  4269. /// - params: 参数
  4270. /// - block: 回调
  4271. - (void)toGetFamilyCreateInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4272. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_FamilyCreateInfo] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4273. {
  4274. if (data)
  4275. {
  4276. if ([self handleError:data])
  4277. {
  4278. block(data, nil);
  4279. }
  4280. }
  4281. else
  4282. {
  4283. block(nil, error);
  4284. }
  4285. }];
  4286. }
  4287. /// 家族信息 - 获取我加入的家族
  4288. /// - Parameters:
  4289. /// - params: 参数
  4290. /// - block: 回调
  4291. - (void)toGetMyFamilyInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4292. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_FamilyForMe] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4293. {
  4294. if (data)
  4295. {
  4296. if ([self handleError:data])
  4297. {
  4298. block(data, nil);
  4299. }
  4300. }
  4301. else
  4302. {
  4303. block(nil, error);
  4304. }
  4305. }];
  4306. }
  4307. /// 家族信息 - 家族列表
  4308. /// - Parameters:
  4309. /// - params: 参数
  4310. /// - block: 回调
  4311. - (void)toGetFamilyInfoListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4312. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_FamilyInfoList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4313. {
  4314. if (data)
  4315. {
  4316. if ([self handleError:data])
  4317. {
  4318. block(data, nil);
  4319. }
  4320. }
  4321. else
  4322. {
  4323. block(nil, error);
  4324. }
  4325. }];
  4326. }
  4327. /// 家族任务 - 我的今日任务
  4328. /// - Parameters:
  4329. /// - params: 参数
  4330. /// - block: 回调
  4331. - (void)toGetFamilyTaskListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4332. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_FamilyTaskToday] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4333. {
  4334. if (data)
  4335. {
  4336. if ([self handleError:data])
  4337. {
  4338. block(data, nil);
  4339. }
  4340. }
  4341. else
  4342. {
  4343. block(nil, error);
  4344. }
  4345. }];
  4346. }
  4347. /// 家族任务 - 完成任务领取奖励
  4348. /// - Parameters:
  4349. /// - params: 参数
  4350. /// - block: 回调
  4351. - (void)toSubmitTheFamilyTaskWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4352. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_FamilyTaskSubmit] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4353. {
  4354. if (data)
  4355. {
  4356. if ([self handleError:data])
  4357. {
  4358. block(data, nil);
  4359. }
  4360. }
  4361. else
  4362. {
  4363. block(nil, error);
  4364. }
  4365. }];
  4366. }
  4367. #pragma mark =========== About Prop ============
  4368. /// 用户道具 - 使用
  4369. /// - Parameters:
  4370. /// - params: 参数
  4371. /// - block: 回调
  4372. - (void)toUseThePropWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4373. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_PropUse] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4374. {
  4375. if (data)
  4376. {
  4377. if ([self handleError:data])
  4378. {
  4379. block(data, nil);
  4380. }
  4381. }
  4382. else
  4383. {
  4384. block(nil, error);
  4385. }
  4386. }];
  4387. }
  4388. /// 用户道具 - 列表信息
  4389. /// - Parameters:
  4390. /// - params: 参数
  4391. /// - block: 回调
  4392. - (void)toGetThePropUserListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4393. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_PropList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4394. {
  4395. if (data)
  4396. {
  4397. if ([self handleError:data])
  4398. {
  4399. block(data, nil);
  4400. }
  4401. }
  4402. else
  4403. {
  4404. block(nil, error);
  4405. }
  4406. }];
  4407. }
  4408. /// 道具商店 - 列表信息
  4409. /// - Parameters:
  4410. /// - params: 参数
  4411. /// - block: 回调
  4412. - (void)toGetThePropInfoListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4413. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_PropInfoList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4414. {
  4415. if (data)
  4416. {
  4417. if ([self handleError:data])
  4418. {
  4419. block(data, nil);
  4420. }
  4421. }
  4422. else
  4423. {
  4424. block(nil, error);
  4425. }
  4426. }];
  4427. }
  4428. /// 道具商店 - 购买
  4429. /// - Parameters:
  4430. /// - params: 参数
  4431. /// - block: 回调
  4432. - (void)toBuyPropWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4433. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_PropBuy] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4434. {
  4435. if (data)
  4436. {
  4437. if ([self handleError:data])
  4438. {
  4439. block(data, nil);
  4440. }
  4441. }
  4442. else
  4443. {
  4444. block(nil, error);
  4445. }
  4446. }];
  4447. }
  4448. /// 道具存储 - 列表信息
  4449. /// - Parameters:
  4450. /// - params: 参数
  4451. /// - block: 回调
  4452. - (void)toGetPropStoreListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4453. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_PropStoreList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4454. {
  4455. if (data)
  4456. {
  4457. if ([self handleError:data])
  4458. {
  4459. block(data, nil);
  4460. }
  4461. }
  4462. else
  4463. {
  4464. block(nil, error);
  4465. }
  4466. }];
  4467. }
  4468. /// 用户道具 - 列表信息 v2.0.2
  4469. /// - Parameters:
  4470. /// - params: 参数
  4471. /// - block: 回调
  4472. - (void)getUserPropListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block {
  4473. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_PropUserList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4474. {
  4475. if (data)
  4476. {
  4477. if ([self handleError:data])
  4478. {
  4479. block(data, nil);
  4480. }
  4481. }
  4482. else
  4483. {
  4484. block(nil, error);
  4485. }
  4486. }];
  4487. }
  4488. #pragma mark =========== About PK ============
  4489. /// PK - PK记录
  4490. /// - Parameters:
  4491. /// - params: 参数
  4492. /// - block: 回调
  4493. - (void)toGetPkRecordListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4494. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_PkRecord] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4495. {
  4496. if (data)
  4497. {
  4498. if ([self handleError:data])
  4499. {
  4500. block(data, nil);
  4501. }
  4502. }
  4503. else
  4504. {
  4505. block(nil, error);
  4506. }
  4507. }];
  4508. }
  4509. /// PK - 匹配
  4510. /// - Parameters:
  4511. /// - params: 参数
  4512. /// - block: 回调
  4513. - (void)toMatchPkInLiveWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4514. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_PkMatch] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4515. {
  4516. if (data)
  4517. {
  4518. if ([self handleError:data])
  4519. {
  4520. block(data, nil);
  4521. }
  4522. }
  4523. else
  4524. {
  4525. block(nil, error);
  4526. }
  4527. }];
  4528. }
  4529. /// PK邀请 - 列表
  4530. /// - Parameters:
  4531. /// - params: 参数
  4532. /// - block: 回调
  4533. - (void)toGetPkInviteListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4534. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_PkInvite] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4535. {
  4536. if (data)
  4537. {
  4538. if ([self handleError:data])
  4539. {
  4540. block(data, nil);
  4541. }
  4542. }
  4543. else
  4544. {
  4545. block(nil, error);
  4546. }
  4547. }];
  4548. }
  4549. /// PK邀请 - 同意上麦
  4550. /// - Parameters:
  4551. /// - params: 参数
  4552. /// - block: 回调
  4553. - (void)toAgreePkInviteWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4554. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_PkAgree] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4555. {
  4556. if (data)
  4557. {
  4558. if ([self handleError:data])
  4559. {
  4560. block(data, nil);
  4561. }
  4562. }
  4563. else
  4564. {
  4565. block(nil, error);
  4566. }
  4567. }];
  4568. }
  4569. /// PK - 关闭
  4570. /// - Parameters:
  4571. /// - params: 参数
  4572. /// - block: 回调
  4573. - (void)toCloseThePkInLiveWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4574. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_PkClose] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4575. {
  4576. if (data)
  4577. {
  4578. if ([self handleError:data])
  4579. {
  4580. block(data, nil);
  4581. }
  4582. }
  4583. else
  4584. {
  4585. block(nil, error);
  4586. }
  4587. }];
  4588. }
  4589. /// PK - 我的PK信息
  4590. /// - Parameters:
  4591. /// - params: 参数
  4592. /// - block: 回调
  4593. - (void)toGetMySelfPkInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4594. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_PkMe] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4595. {
  4596. if (data)
  4597. {
  4598. if ([self handleError:data])
  4599. {
  4600. block(data, nil);
  4601. }
  4602. }
  4603. else
  4604. {
  4605. block(nil, error);
  4606. }
  4607. }];
  4608. }
  4609. /// PK - PK 结算
  4610. /// - Parameters:
  4611. /// - params: 参数
  4612. /// - block: 回调
  4613. - (void)toSettleThePkWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4614. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_PkSettle] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4615. {
  4616. if (data)
  4617. {
  4618. if ([self handleError:data])
  4619. {
  4620. block(data, nil);
  4621. }
  4622. }
  4623. else
  4624. {
  4625. block(nil, error);
  4626. }
  4627. }];
  4628. }
  4629. /// PK - PK贡献榜
  4630. /// - Parameters:
  4631. /// - params: 参数
  4632. /// - block: 回调
  4633. - (void)toGetThePkContributeInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4634. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_PkContribute] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4635. {
  4636. if (data)
  4637. {
  4638. if ([self handleError:data])
  4639. {
  4640. block(data, nil);
  4641. }
  4642. }
  4643. else
  4644. {
  4645. block(nil, error);
  4646. }
  4647. }];
  4648. }
  4649. /// PK - 周奖励礼物
  4650. /// - Parameters:
  4651. /// - params: 参数
  4652. /// - block: 回调
  4653. - (void)toGetThePkWeekRewardInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4654. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_PkWeekReward] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4655. {
  4656. if (data)
  4657. {
  4658. if ([self handleError:data])
  4659. {
  4660. block(data, nil);
  4661. }
  4662. }
  4663. else
  4664. {
  4665. block(nil, error);
  4666. }
  4667. }];
  4668. }
  4669. #pragma mark =========== About Source ============
  4670. /// 礼物资源列表
  4671. /// - Parameters:
  4672. /// - params: 参数
  4673. /// - block: 回调
  4674. - (void)toGetTheGiftStoreListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4675. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_SourceGift] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4676. {
  4677. if (data)
  4678. {
  4679. if ([self handleError:data])
  4680. {
  4681. block(data, nil);
  4682. }
  4683. }
  4684. else
  4685. {
  4686. block(nil, error);
  4687. }
  4688. }];
  4689. }
  4690. /// 互动特效列表
  4691. /// - Parameters:
  4692. /// - params: 参数
  4693. /// - block: 回调
  4694. - (void)toGetTheEffectListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4695. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_SourceEffect] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4696. {
  4697. if (data)
  4698. {
  4699. if ([self handleError:data])
  4700. {
  4701. block(data, nil);
  4702. }
  4703. }
  4704. else
  4705. {
  4706. block(nil, error);
  4707. }
  4708. }];
  4709. }
  4710. /// 礼物分类 - 列表
  4711. /// - Parameters:
  4712. /// - params: 参数
  4713. /// - block: 回调
  4714. - (void)toGetGiftCategoryListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4715. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_GiftCategoryList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4716. {
  4717. if (data)
  4718. {
  4719. if ([self handleError:data])
  4720. {
  4721. block(data, nil);
  4722. }
  4723. }
  4724. else
  4725. {
  4726. block(nil, error);
  4727. }
  4728. }];
  4729. }
  4730. /// 礼物倍数 - 列表
  4731. /// - Parameters:
  4732. /// - params: 参数
  4733. /// - block: 回调
  4734. - (void)toGetTheGiftMultipleListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4735. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_TheGiftMultipleList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4736. {
  4737. if (data)
  4738. {
  4739. if ([self handleError:data])
  4740. {
  4741. block(data, nil);
  4742. }
  4743. }
  4744. else
  4745. {
  4746. block(nil, error);
  4747. }
  4748. }];
  4749. }
  4750. /// 用户等级框 - 资源列表
  4751. /// - Parameters:
  4752. /// - params: 参数
  4753. /// - block: 回调
  4754. - (void)toGetTheLevelResourcesListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4755. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_LevelBoxList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4756. {
  4757. if (data)
  4758. {
  4759. if ([self handleError:data])
  4760. {
  4761. block(data, nil);
  4762. }
  4763. }
  4764. else
  4765. {
  4766. block(nil, error);
  4767. }
  4768. }];
  4769. }
  4770. /// 勋章库 - 资源列表
  4771. /// - Parameters:
  4772. /// - params: 参数
  4773. /// - block: 回调
  4774. - (void)toGetTheMedalResourcesListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4775. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_MedalStoreList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4776. {
  4777. if (data)
  4778. {
  4779. if ([self handleError:data])
  4780. {
  4781. block(data, nil);
  4782. }
  4783. }
  4784. else
  4785. {
  4786. block(nil, error);
  4787. }
  4788. }];
  4789. }
  4790. #pragma mark =========== About Medal ============
  4791. /// 基础勋章列表
  4792. /// - Parameters:
  4793. /// - params: 参数
  4794. /// - block: 回调
  4795. - (void)toGetBaseMedalInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4796. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_MedalBase] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4797. {
  4798. if (data)
  4799. {
  4800. if ([self handleError:data])
  4801. {
  4802. block(data, nil);
  4803. }
  4804. }
  4805. else
  4806. {
  4807. block(nil, error);
  4808. }
  4809. }];
  4810. }
  4811. /// 基础勋章列表(查看他人勋章)
  4812. /// - Parameters:
  4813. /// - params: 参数
  4814. /// - block: 回调
  4815. - (void)toGetOtherUserMedalInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4816. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_MedalOthers] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4817. {
  4818. if (data)
  4819. {
  4820. if ([self handleError:data])
  4821. {
  4822. block(data, nil);
  4823. }
  4824. }
  4825. else
  4826. {
  4827. block(nil, error);
  4828. }
  4829. }];
  4830. }
  4831. #pragma mark =========== About Pack ============
  4832. /// 礼物背包 - 用户礼物背包
  4833. /// - Parameters:
  4834. /// - params: 参数
  4835. /// - block: 回调
  4836. - (void)toGetPackGiftListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4837. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_PackGiftV2List] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4838. {
  4839. if (data)
  4840. {
  4841. if ([self handleError:data])
  4842. {
  4843. block(data, nil);
  4844. }
  4845. }
  4846. else
  4847. {
  4848. block(nil, error);
  4849. }
  4850. }];
  4851. }
  4852. /// 直播间 道具列表 v2.0.2
  4853. /// - Parameters:
  4854. /// - params: 参数
  4855. /// - block: 回调
  4856. - (void)toGetPackPropListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4857. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_PropListForlive] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4858. {
  4859. if (data)
  4860. {
  4861. if ([self handleError:data])
  4862. {
  4863. block(data, nil);
  4864. }
  4865. }
  4866. else
  4867. {
  4868. block(nil, error);
  4869. }
  4870. }];
  4871. }
  4872. /// 用户端 - 直播间送礼物(赠送背包的)
  4873. /// - Parameters:
  4874. /// - params: 参数
  4875. /// - block: 回调
  4876. - (void)toGivingPackGiftWithParams:(id)params andBlock:(void (^)(id _Nullable data, NSError *error))block{
  4877. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_GivingPack] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4878. {
  4879. if (data)
  4880. {
  4881. if ([self handleError:data])
  4882. {
  4883. block(data, nil);
  4884. }
  4885. }
  4886. else
  4887. {
  4888. block(nil, error);
  4889. }
  4890. }];
  4891. }
  4892. /// 礼物背包 - 我的背包礼物列表
  4893. /// - Parameters:
  4894. /// - params: 参数
  4895. /// - block: 回调
  4896. - (void)toGetThePackGiftAllWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4897. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_PackGiftAll] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4898. {
  4899. if (data)
  4900. {
  4901. if ([self handleError:data])
  4902. {
  4903. block(data, nil);
  4904. }
  4905. }
  4906. else
  4907. {
  4908. block(nil, error);
  4909. }
  4910. }];
  4911. }
  4912. /// 用户道具 - 用户道具过期记录 v2.0.2
  4913. /// - Parameters:
  4914. /// - params: 参数
  4915. /// - block: 回调
  4916. - (void)getPropExpireListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block {
  4917. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_PropExpireList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4918. {
  4919. if (data)
  4920. {
  4921. if ([self handleError:data])
  4922. {
  4923. block(data, nil);
  4924. }
  4925. }
  4926. else
  4927. {
  4928. block(nil, error);
  4929. }
  4930. }];
  4931. }
  4932. /// 礼物背包 - 用户礼物背包-过期列表
  4933. /// - Parameters:
  4934. /// - params: 参数
  4935. /// - block: 回调
  4936. - (void)getPackGiftExpireListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block {
  4937. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_GiftExpireList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4938. {
  4939. if (data)
  4940. {
  4941. if ([self handleError:data])
  4942. {
  4943. block(data, nil);
  4944. }
  4945. }
  4946. else
  4947. {
  4948. block(nil, error);
  4949. }
  4950. }];
  4951. }
  4952. #pragma mark =========== About Vip ============
  4953. /// 我的VIP信息
  4954. /// - Parameters:
  4955. /// - params: 参数
  4956. /// - block: 回调
  4957. - (void)getMyVipInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4958. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_VipMyInfo] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4959. {
  4960. if (data)
  4961. {
  4962. if ([self handleError:data])
  4963. {
  4964. block(data, nil);
  4965. }
  4966. }
  4967. else
  4968. {
  4969. block(nil, error);
  4970. }
  4971. }];
  4972. }
  4973. /// VIP 配置信息
  4974. /// - Parameters:
  4975. /// - params: 参数
  4976. /// - block: 回调
  4977. - (void)getTheVipConfigWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4978. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_VipConfig] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4979. {
  4980. if (data)
  4981. {
  4982. if ([self handleError:data])
  4983. {
  4984. block(data, nil);
  4985. }
  4986. }
  4987. else
  4988. {
  4989. block(nil, error);
  4990. }
  4991. }];
  4992. }
  4993. /// 购买VIP-续费VIP
  4994. /// - Parameters:
  4995. /// - params: 参数
  4996. /// - block: 回调
  4997. - (void)toBuyTheVipWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  4998. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_VipBuy] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  4999. {
  5000. if (data)
  5001. {
  5002. if ([self handleError:data])
  5003. {
  5004. block(data, nil);
  5005. }
  5006. }
  5007. else
  5008. {
  5009. block(nil, error);
  5010. }
  5011. }];
  5012. }
  5013. /// 领取购买的VIP每日礼包
  5014. /// - Parameters:
  5015. /// - params: 参数
  5016. /// - block: 回调
  5017. - (void)toGetTheVipDailyGiftWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5018. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_TheVipDaily] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5019. {
  5020. if (data)
  5021. {
  5022. if ([self handleError:data])
  5023. {
  5024. block(data, nil);
  5025. }
  5026. }
  5027. else
  5028. {
  5029. block(nil, error);
  5030. }
  5031. }];
  5032. }
  5033. /// 领取购买的VIP礼包
  5034. /// - Parameters:
  5035. /// - params: 参数
  5036. /// - block: 回调
  5037. - (void)toGetTheVipGiftBagWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5038. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_TheVipGiftBag] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5039. {
  5040. if (data)
  5041. {
  5042. if ([self handleError:data])
  5043. {
  5044. block(data, nil);
  5045. }
  5046. }
  5047. else
  5048. {
  5049. block(nil, error);
  5050. }
  5051. }];
  5052. }
  5053. // New VIP
  5054. /// VIP订单 - 订单列表
  5055. /// - Parameters:
  5056. /// - params: 参数
  5057. /// - block: 回调
  5058. - (void)toGetTheVipOrderListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5059. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_TheVipOrderList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5060. {
  5061. if (data)
  5062. {
  5063. if ([self handleError:data])
  5064. {
  5065. block(data, nil);
  5066. }
  5067. }
  5068. else
  5069. {
  5070. block(nil, error);
  5071. }
  5072. }];
  5073. }
  5074. /// VIP计划 - 配置列表信息
  5075. /// - Parameters:
  5076. /// - params: 参数
  5077. /// - block: 回调
  5078. - (void)toGetTheVipPlanListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5079. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_TheVipPlanList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5080. {
  5081. if (data)
  5082. {
  5083. if ([self handleError:data])
  5084. {
  5085. block(data, nil);
  5086. }
  5087. }
  5088. else
  5089. {
  5090. block(nil, error);
  5091. }
  5092. }];
  5093. }
  5094. /// 开启或关闭神秘人
  5095. /// - Parameters:
  5096. /// - params: 参数
  5097. /// - block: 回调
  5098. - (void)toSetMysteriousWwitchWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5099. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_MysteriousSwitch] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5100. {
  5101. if (data)
  5102. {
  5103. if ([self handleError:data])
  5104. {
  5105. block(data, nil);
  5106. }
  5107. }
  5108. else
  5109. {
  5110. block(nil, error);
  5111. }
  5112. }];
  5113. }
  5114. /// 神秘人默认资料信息
  5115. /// - Parameters:
  5116. /// - params: 参数
  5117. /// - block: 回调
  5118. - (void)toGetTheMysteriousInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5119. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_MysteriousGetInfo] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5120. {
  5121. if (data)
  5122. {
  5123. if ([self handleError:data])
  5124. {
  5125. block(data, nil);
  5126. }
  5127. }
  5128. else
  5129. {
  5130. block(nil, error);
  5131. }
  5132. }];
  5133. }
  5134. /// VIP计划 - 领取每日礼包
  5135. /// - Parameters:
  5136. /// - params: 参数
  5137. /// - block: 回调
  5138. - (void)toGetTheVipPlanDailyWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5139. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_TheVipPlanDaily] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5140. {
  5141. if (data)
  5142. {
  5143. if ([self handleError:data])
  5144. {
  5145. block(data, nil);
  5146. }
  5147. }
  5148. else
  5149. {
  5150. block(nil, error);
  5151. }
  5152. }];
  5153. }
  5154. /// VIP计划 - 购买VIP-续费VIP-升级VIP
  5155. /// - Parameters:
  5156. /// - params: 参数
  5157. /// - block: 回调
  5158. - (void)toGetTheVipPlanBuyWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5159. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_TheVipPlanBuy] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5160. {
  5161. if (data)
  5162. {
  5163. if ([self handleError:data])
  5164. {
  5165. block(data, nil);
  5166. }
  5167. }
  5168. else
  5169. {
  5170. block(nil, error);
  5171. }
  5172. }];
  5173. }
  5174. #pragma mark =========== About Wallet ============
  5175. /// 钱包充值 - 充值记录
  5176. /// - Parameters:
  5177. /// - params: 参数
  5178. /// - block: 回调
  5179. - (void)toGetWalletRechargeRecordWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5180. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_TheReCharegeRecord] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5181. {
  5182. if (data)
  5183. {
  5184. if ([self handleError:data])
  5185. {
  5186. block(data, nil);
  5187. }
  5188. }
  5189. else
  5190. {
  5191. block(nil, error);
  5192. }
  5193. }];
  5194. }
  5195. /// 用户收益信息
  5196. /// - Parameters:
  5197. /// - params: 参数
  5198. /// - block: 回调
  5199. - (void)theUserIncomeInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5200. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_WalletUserIncome] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5201. {
  5202. if (data)
  5203. {
  5204. if ([self handleError:data])
  5205. {
  5206. block(data, nil);
  5207. }
  5208. }
  5209. else
  5210. {
  5211. block(nil, error);
  5212. }
  5213. }];
  5214. }
  5215. /// 钱包充值 - 商品充值预下单
  5216. /// - Parameters:
  5217. /// - params: 参数
  5218. /// - block: 回调
  5219. - (void)toRechargeGoodsPrePayWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5220. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_GoodsPrePay] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5221. {
  5222. if (data)
  5223. {
  5224. if ([self handleError:data])
  5225. {
  5226. block(data, nil);
  5227. }
  5228. }
  5229. else
  5230. {
  5231. block(nil, error);
  5232. }
  5233. }];
  5234. }
  5235. /// 钱包充值 - 商品充值支付成功回调
  5236. /// - Parameters:
  5237. /// - params: 参数
  5238. /// - block: 回调
  5239. - (void)theGoodsPayBakWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5240. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_GoodsPayBak] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5241. {
  5242. if (data)
  5243. {
  5244. if ([self handleError:data])
  5245. {
  5246. block(data, nil);
  5247. }
  5248. }
  5249. else
  5250. {
  5251. block(nil, error);
  5252. }
  5253. }];
  5254. }
  5255. /// 钱包充值 - 订单取消
  5256. /// - Parameters:
  5257. /// - params: 参数
  5258. /// - block: 回调
  5259. - (void)theGoodsCancelWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5260. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_GoodsPayCancel] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5261. {
  5262. if (data)
  5263. {
  5264. if ([self handleError:data])
  5265. {
  5266. block(data, nil);
  5267. }
  5268. }
  5269. else
  5270. {
  5271. block(nil, error);
  5272. }
  5273. }];
  5274. }
  5275. /// 钱包充值 - 获取商品首充配置
  5276. /// - Parameters:
  5277. /// - params: 参数
  5278. /// - block: 回调
  5279. - (void)theRechargeAboutGoodsRewardWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5280. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_RechargeReward] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5281. {
  5282. if (data)
  5283. {
  5284. if ([self handleError:data])
  5285. {
  5286. block(data, nil);
  5287. }
  5288. }
  5289. else
  5290. {
  5291. block(nil, error);
  5292. }
  5293. }];
  5294. }
  5295. /// 钱包充值 - 商品信息
  5296. /// - Parameters:
  5297. /// - params: 参数
  5298. /// - block: 回调
  5299. - (void)toGetTheRechargeGoodsInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5300. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_RechargeGoodsInfo] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5301. {
  5302. if (data)
  5303. {
  5304. if ([self handleError:data])
  5305. {
  5306. block(data, nil);
  5307. }
  5308. }
  5309. else
  5310. {
  5311. block(nil, error);
  5312. }
  5313. }];
  5314. }
  5315. #pragma mark =========== About Device ============
  5316. /// 设备汇报
  5317. /// - Parameters:
  5318. /// - params: 参数
  5319. /// - block: 回调
  5320. - (void)toReportTheDeviceInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5321. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_TheDeviceReport] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5322. {
  5323. if (data)
  5324. {
  5325. if ([self handleError:data])
  5326. {
  5327. block(data, nil);
  5328. }
  5329. }
  5330. else
  5331. {
  5332. block(nil, error);
  5333. }
  5334. }];
  5335. }
  5336. /// 用户钻石数
  5337. /// - Parameters:
  5338. /// - params: 参数
  5339. /// - block: 回调
  5340. - (void)toGetTheUserCurrentDiamondWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5341. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_GetUserDiamond] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5342. {
  5343. if (data)
  5344. {
  5345. if ([self handleError:data])
  5346. {
  5347. block(data, nil);
  5348. }
  5349. }
  5350. else
  5351. {
  5352. block(nil, error);
  5353. }
  5354. }];
  5355. }
  5356. #pragma mark =========== About Like Click ============
  5357. /// 点赞 - 直播间点赞 - 提交
  5358. /// - Parameters:
  5359. /// - params: 参数
  5360. /// - block: 回调
  5361. - (void)toSubmitTheLikeClickWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5362. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_likeRoomSubmit] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5363. {
  5364. if (data)
  5365. {
  5366. if ([self handleError:data])
  5367. {
  5368. block(data, nil);
  5369. }
  5370. }
  5371. else
  5372. {
  5373. block(nil, error);
  5374. }
  5375. }];
  5376. }
  5377. /// 点赞 - 直播间点赞 - 列表
  5378. /// - Parameters:
  5379. /// - params: 参数
  5380. /// - block: 回调
  5381. - (void)toGetTheLikeClickListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5382. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_likeRoomList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5383. {
  5384. if (data)
  5385. {
  5386. if ([self handleError:data])
  5387. {
  5388. block(data, nil);
  5389. }
  5390. }
  5391. else
  5392. {
  5393. block(nil, error);
  5394. }
  5395. }];
  5396. }
  5397. /// 点赞 - 直播间点赞配置
  5398. /// - Parameters:
  5399. /// - params: 参数
  5400. /// - block: 回调
  5401. - (void)toGetTheLikeConfingWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5402. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_likeRoomConfig] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5403. {
  5404. if (data)
  5405. {
  5406. if ([self handleError:data])
  5407. {
  5408. block(data, nil);
  5409. }
  5410. }
  5411. else
  5412. {
  5413. block(nil, error);
  5414. }
  5415. }];
  5416. }
  5417. #pragma mark =========== About GiftPack ============
  5418. /// 礼包信息 - 预下单
  5419. /// - Parameters:
  5420. /// - params: 参数
  5421. /// - block: 回调
  5422. - (void)toGetTheGiftPackPreOrderWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5423. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_GiftPackPerOrder] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5424. {
  5425. if (data)
  5426. {
  5427. if ([self handleError:data])
  5428. {
  5429. block(data, nil);
  5430. }
  5431. }
  5432. else
  5433. {
  5434. block(nil, error);
  5435. }
  5436. }];
  5437. }
  5438. /// 礼包信息 - 获取
  5439. /// - Parameters:
  5440. /// - params: 参数
  5441. /// - block: 回调
  5442. - (void)toGetTheGiftPackListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5443. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_GiftPackList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5444. {
  5445. if (data)
  5446. {
  5447. if ([self handleError:data])
  5448. {
  5449. block(data, nil);
  5450. }
  5451. }
  5452. else
  5453. {
  5454. block(nil, error);
  5455. }
  5456. }];
  5457. }
  5458. /// 礼包信息 - 支付回调
  5459. /// - Parameters:
  5460. /// - params: 参数
  5461. /// - block: 回调
  5462. - (void)theGiftPackCallBackWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5463. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_GiftPackCallBack] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5464. {
  5465. if (data)
  5466. {
  5467. if ([self handleError:data])
  5468. {
  5469. block(data, nil);
  5470. }
  5471. }
  5472. else
  5473. {
  5474. block(nil, error);
  5475. }
  5476. }];
  5477. }
  5478. #pragma mark =========== About Red Rain ============
  5479. /// 抢红包雨结果提交
  5480. /// - Parameters:
  5481. /// - params: 参数
  5482. /// - block: 回调
  5483. - (void)toSubmitRedRainResultWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5484. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_RedRainSubmit] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5485. {
  5486. if (data)
  5487. {
  5488. if ([self handleError:data])
  5489. {
  5490. block(data, nil);
  5491. }
  5492. }
  5493. else
  5494. {
  5495. block(nil, error);
  5496. }
  5497. }];
  5498. }
  5499. /// 抢红包雨名额
  5500. /// - Parameters:
  5501. /// - params: 参数
  5502. /// - block: 回调
  5503. - (void)toRequestTheRedRainWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5504. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_RedRainRequest] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5505. {
  5506. if (data)
  5507. {
  5508. if ([self handleError:data])
  5509. {
  5510. block(data, nil);
  5511. }
  5512. }
  5513. else
  5514. {
  5515. block(nil, error);
  5516. }
  5517. }];
  5518. }
  5519. #pragma mark =========== About Wame ============
  5520. /// 信息 - 列表
  5521. /// - Parameters:
  5522. /// - params: 参数
  5523. /// - block: 回调
  5524. - (void)toGetWameListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5525. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_WameInfoList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5526. {
  5527. if (data)
  5528. {
  5529. if ([self handleError:data])
  5530. {
  5531. block(data, nil);
  5532. }
  5533. }
  5534. else
  5535. {
  5536. block(nil, error);
  5537. }
  5538. }];
  5539. }
  5540. /// 进入
  5541. /// - Parameters:
  5542. /// - params: 参数
  5543. /// - block: 回调
  5544. - (void)toEnterWameWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5545. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_WameInfoEnter] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5546. {
  5547. if (data)
  5548. {
  5549. if ([self handleError:data])
  5550. {
  5551. block(data, nil);
  5552. }
  5553. }
  5554. else
  5555. {
  5556. block(nil, error);
  5557. }
  5558. }];
  5559. }
  5560. #pragma mark =========== Sign Task ============
  5561. /// 签到任务 - 签到信息
  5562. /// - Parameters:
  5563. /// - params: 参数
  5564. /// - block: 回调
  5565. - (void)toGetTheSignTaskInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5566. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_SignTaskInfo] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5567. {
  5568. if (data)
  5569. {
  5570. if ([self handleError:data])
  5571. {
  5572. block(data, nil);
  5573. }
  5574. }
  5575. else
  5576. {
  5577. block(nil, error);
  5578. }
  5579. }];
  5580. }
  5581. /// 签到任务 - 签到 - 提交
  5582. /// - Parameters:
  5583. /// - params: 参数
  5584. /// - block: 回调
  5585. - (void)toSubmitTheSignTaskAboutSignWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5586. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_SignTaskSubmit] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5587. {
  5588. if (data)
  5589. {
  5590. if ([self handleError:data])
  5591. {
  5592. block(data, nil);
  5593. }
  5594. }
  5595. else
  5596. {
  5597. block(nil, error);
  5598. }
  5599. }];
  5600. }
  5601. #pragma mark =========== Red Envelope ============
  5602. /// 获取红包相关配置
  5603. /// - Parameters:
  5604. /// - params: 参数
  5605. /// - block: 回调
  5606. - (void)toGetTheRedEnvelopeConfigWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5607. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_RedEnvelopeConfig] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5608. {
  5609. if (data)
  5610. {
  5611. if ([self handleError:data])
  5612. {
  5613. block(data, nil);
  5614. }
  5615. }
  5616. else
  5617. {
  5618. block(nil, error);
  5619. }
  5620. }];
  5621. }
  5622. /// 发红包
  5623. /// - Parameters:
  5624. /// - params: 参数
  5625. /// - block: 回调
  5626. - (void)toSendTheRedEnvelopeConfigWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5627. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_RedEnvelopeSend] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5628. {
  5629. if (data)
  5630. {
  5631. //没钱弹窗继续
  5632. [self handleError:data];
  5633. block(data, nil);
  5634. }
  5635. else
  5636. {
  5637. block(nil, error);
  5638. }
  5639. }];
  5640. }
  5641. /// 获取红包领取情况
  5642. /// - Parameters:
  5643. /// - params: 参数
  5644. /// - block: 回调
  5645. - (void)toGetTheRedEnvelopeReceivingInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5646. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_RedEnvelopeReceivedInfo] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5647. {
  5648. if (data)
  5649. {
  5650. if ([self handleError:data])
  5651. {
  5652. block(data, nil);
  5653. }
  5654. }
  5655. else
  5656. {
  5657. block(nil, error);
  5658. }
  5659. }];
  5660. }
  5661. /// 领红包
  5662. /// - Parameters:
  5663. /// - params: 参数
  5664. /// - block: 回调
  5665. - (void)toReceiveTheRedEnvelopeWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5666. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_RedReceive] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5667. {
  5668. if (data)
  5669. {
  5670. if ([self handleError:data])
  5671. {
  5672. block(data, nil);
  5673. }
  5674. }
  5675. else
  5676. {
  5677. block(nil, error);
  5678. }
  5679. }];
  5680. }
  5681. /// 获取房间红包列表信息
  5682. /// - Parameters:
  5683. /// - params: 参数
  5684. /// - block: 回调
  5685. - (void)toGetTheRedEnvelopeListOfRoomWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5686. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_RedListOfRoom] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5687. {
  5688. if (data)
  5689. {
  5690. if ([self handleError:data])
  5691. {
  5692. block(data, nil);
  5693. }
  5694. }
  5695. else
  5696. {
  5697. block(nil, error);
  5698. }
  5699. }];
  5700. }
  5701. /// 获取用户已发红包列表
  5702. /// - Parameters:
  5703. /// - params: 参数
  5704. /// - block: 回调
  5705. - (void)toGetTheUserSendRecordWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5706. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_RedUserSendRecord] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5707. {
  5708. if (data)
  5709. {
  5710. if ([self handleError:data])
  5711. {
  5712. block(data, nil);
  5713. }
  5714. }
  5715. else
  5716. {
  5717. block(nil, error);
  5718. }
  5719. }];
  5720. }
  5721. /// 获取用户领红包列表
  5722. /// - Parameters:
  5723. /// - params: 参数
  5724. /// - block: 回调
  5725. - (void)toGetTheUserReceiveRecordWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5726. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_RedUserReceiveRecord] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5727. {
  5728. if (data)
  5729. {
  5730. if ([self handleError:data])
  5731. {
  5732. block(data, nil);
  5733. }
  5734. }
  5735. else
  5736. {
  5737. block(nil, error);
  5738. }
  5739. }];
  5740. }
  5741. /// 获取指定红包详情
  5742. /// - Parameters:
  5743. /// - params: 参数
  5744. /// - block: 回调
  5745. - (void)toGetTheRedEnvelopeInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5746. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_RedEvnelopeGetInfo] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5747. {
  5748. if (data)
  5749. {
  5750. if ([self handleError:data])
  5751. {
  5752. block(data, nil);
  5753. }
  5754. }
  5755. else
  5756. {
  5757. block(nil, error);
  5758. }
  5759. }];
  5760. }
  5761. #pragma mark =========== Big Winner ============
  5762. /// 大赢家活动 - 已经结束的列表
  5763. /// - Parameters:
  5764. /// - params: 参数
  5765. /// - block: 回调
  5766. - (void)getTheBigWinRecordListWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5767. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_BigWinRecord] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5768. {
  5769. if (data)
  5770. {
  5771. if ([self handleError:data])
  5772. {
  5773. block(data, nil);
  5774. }
  5775. }
  5776. else
  5777. {
  5778. block(nil, error);
  5779. }
  5780. }];
  5781. }
  5782. /// 大赢家活动 - 当前正在进行的列表
  5783. /// - Parameters:
  5784. /// - params: 参数
  5785. /// - block: 回调
  5786. - (void)getTheBigWinListDataWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5787. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_BigWinWinList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5788. {
  5789. if (data)
  5790. {
  5791. if ([self handleError:data])
  5792. {
  5793. block(data, nil);
  5794. }
  5795. }
  5796. else
  5797. {
  5798. block(nil, error);
  5799. }
  5800. }];
  5801. }
  5802. /// 大赢家活动 - 最近中奖记录
  5803. /// - Parameters:
  5804. /// - params: 参数
  5805. /// - block: 回调
  5806. - (void)getTheBigWinLatelyListDataWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5807. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_BigWinWinLately] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5808. {
  5809. if (data)
  5810. {
  5811. if ([self handleError:data])
  5812. {
  5813. block(data, nil);
  5814. }
  5815. }
  5816. else
  5817. {
  5818. block(nil, error);
  5819. }
  5820. }];
  5821. }
  5822. /// 大赢家活动 - 获取活动最后参加记录
  5823. /// - Parameters:
  5824. /// - params: 参数
  5825. /// - block: 回调
  5826. - (void)getTheBigWinLastDataWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5827. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_BigWinWinLast] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5828. {
  5829. if (data)
  5830. {
  5831. if ([self handleError:data])
  5832. {
  5833. block(data, nil);
  5834. }
  5835. }
  5836. else
  5837. {
  5838. block(nil, error);
  5839. }
  5840. }];
  5841. }
  5842. /// 大赢家活动 - 参加活动
  5843. /// - Parameters:
  5844. /// - params: 参数
  5845. /// - block: 回调
  5846. - (void)toJoinTheBigWinWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5847. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_BigWinJoin] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5848. {
  5849. if (data)
  5850. {
  5851. if ([self handleError:data])
  5852. {
  5853. block(data, nil);
  5854. }
  5855. }
  5856. else
  5857. {
  5858. block(nil, error);
  5859. }
  5860. }];
  5861. }
  5862. /// 大赢家活动 - 活动详情
  5863. /// - Parameters:
  5864. /// - params: 参数
  5865. /// - block: 回调
  5866. - (void)getTheBigWinDetailWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5867. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_BigWinDetail] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5868. {
  5869. if (data)
  5870. {
  5871. if ([self handleError:data])
  5872. {
  5873. block(data, nil);
  5874. }
  5875. }
  5876. else
  5877. {
  5878. block(nil, error);
  5879. }
  5880. }];
  5881. }
  5882. /// 弹框 - APP 弹框信息
  5883. /// - Parameters:
  5884. /// - params: 参数
  5885. /// - block: 回调
  5886. - (void)getTheDialogInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  5887. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_DialogGet] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5888. {
  5889. if (data)
  5890. {
  5891. if ([self handleError:data])
  5892. {
  5893. block(data, nil);
  5894. }
  5895. }
  5896. else
  5897. {
  5898. block(nil, error);
  5899. }
  5900. }];
  5901. }
  5902. /// 领取新人礼包
  5903. /// - Parameters:
  5904. /// - params: 参数
  5905. /// - block: 回调
  5906. - (void)claimNewUserGiftPackWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block {
  5907. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_ClaimGiftPack] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5908. {
  5909. if (data)
  5910. {
  5911. if ([self handleError:data])
  5912. {
  5913. block(data, nil);
  5914. }
  5915. }
  5916. else
  5917. {
  5918. block(nil, error);
  5919. }
  5920. }];
  5921. }
  5922. /// 当前样式配置
  5923. /// - Parameters:
  5924. /// - params: 参数
  5925. /// - block: 回调
  5926. - (void)getThemeWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block {
  5927. // 定义本接口缓存的有效时长:24小时
  5928. const static NSTimeInterval kRequestThemeCacheDuration = 24 * 3600;
  5929. if (kHttpManager.responseCacheDict[kNetPath_Code_ThemeGet]) {
  5930. MOApiResponseCacheModel *cacheModel = kHttpManager.responseCacheDict[kNetPath_Code_ThemeGet];
  5931. NSTimeInterval nowTime = [[NSDate date] timeIntervalSince1970];
  5932. if (nowTime < cacheModel.responseTime + kRequestThemeCacheDuration) {
  5933. // 读取缓存数据,主线程返回
  5934. dispatch_async(dispatch_get_main_queue(), ^{
  5935. block(cacheModel.responseData, nil);
  5936. });
  5937. return;
  5938. }
  5939. }
  5940. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_ThemeGet] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5941. {
  5942. if (data)
  5943. {
  5944. if ([self handleError:data])
  5945. {
  5946. if (kCode_Success){
  5947. // 接口数据业务正常返回,缓存数据
  5948. [kHttpManager cacheApiData:data key:kNetPath_Code_ThemeGet];
  5949. }
  5950. block(data, nil);
  5951. }
  5952. }
  5953. else
  5954. {
  5955. block(nil, error);
  5956. }
  5957. }];
  5958. }
  5959. #pragma mark =========== 全民代理 ============
  5960. /// 获取用户代理绑定状态
  5961. /// - Parameters:
  5962. /// - params: 参数
  5963. /// - block: 回调
  5964. - (void)getAffiliateStateWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block {
  5965. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_AffiliateState] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5966. {
  5967. if (data)
  5968. {
  5969. if ([self handleError:data])
  5970. {
  5971. block(data, nil);
  5972. }
  5973. }
  5974. else
  5975. {
  5976. block(nil, error);
  5977. }
  5978. }];
  5979. }
  5980. /// 绑定上级
  5981. /// - Parameters:
  5982. /// - params: 参数
  5983. /// - block: 回调
  5984. - (void)bindAffiliateWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block {
  5985. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_BindAffiliate] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  5986. {
  5987. if (data)
  5988. {
  5989. if ([self handleError:data])
  5990. {
  5991. block(data, nil);
  5992. }
  5993. }
  5994. else
  5995. {
  5996. block(nil, error);
  5997. }
  5998. }];
  5999. }
  6000. /// 代理账户 - 获取当前可领取钻石数
  6001. /// - Parameters:
  6002. /// - params: 参数
  6003. /// - block: 回调
  6004. - (void)getAffiliateAccountWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block {
  6005. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_GetAffiliateAccount] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  6006. {
  6007. if (data)
  6008. {
  6009. if ([self handleError:data])
  6010. {
  6011. block(data, nil);
  6012. }
  6013. }
  6014. else
  6015. {
  6016. block(nil, error);
  6017. }
  6018. }];
  6019. }
  6020. #pragma mark =========== 充值返利 ============
  6021. - (void)getBadgeListDataWithParams:(id)params needCache:(BOOL)cache andBlock:(void (^)(id data, NSError *error))block {
  6022. // 定义本接口缓存的有效时长:15分钟
  6023. const static NSTimeInterval kRequestBadgeCacheDuration = 15 * 60;
  6024. if (kHttpManager.responseCacheDict[kNetPath_Code_BadgeList] && cache) {
  6025. MOApiResponseCacheModel *cacheModel = kHttpManager.responseCacheDict[kNetPath_Code_BadgeList];
  6026. NSTimeInterval nowTime = [[NSDate date] timeIntervalSince1970];
  6027. if (nowTime < cacheModel.responseTime + kRequestBadgeCacheDuration) {
  6028. // 读取缓存数据,主线程返回
  6029. dispatch_async(dispatch_get_main_queue(), ^{
  6030. block(cacheModel.responseData, nil);
  6031. });
  6032. return;
  6033. }
  6034. }
  6035. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_BadgeList] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  6036. {
  6037. if (data)
  6038. {
  6039. if ([self handleError:data])
  6040. {
  6041. if (kCode_Success && cache){
  6042. // 接口数据业务正常返回,缓存数据
  6043. [kHttpManager cacheApiData:data key:kNetPath_Code_BadgeList];
  6044. }
  6045. block(data, nil);
  6046. }
  6047. }
  6048. else
  6049. {
  6050. block(nil, error);
  6051. }
  6052. }];
  6053. }
  6054. #pragma mark =========== 翻译 ============
  6055. /// 获得当前用户的语言配置
  6056. /// - Parameters:
  6057. /// - params: 参数
  6058. /// - block: 回调
  6059. - (void)toGetTheTranslationInfoAboutMyWith:(id)params andBlock:(void (^)(id data, NSError *error))block{
  6060. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_TranslationSteamGet] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  6061. {
  6062. if (data)
  6063. {
  6064. if ([self handleError:data])
  6065. {
  6066. block(data, nil);
  6067. }
  6068. }
  6069. else
  6070. {
  6071. block(nil, error);
  6072. }
  6073. }];
  6074. }
  6075. /// 获取支持的语言配置
  6076. /// - Parameters:
  6077. /// - params: 参数
  6078. /// - block: 回调
  6079. - (void)toGetTheTranslationConfigWith:(id)params andBlock:(void (^)(id data, NSError *error))block{
  6080. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_TranslationSteamConfig] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  6081. {
  6082. if (data)
  6083. {
  6084. if ([self handleError:data])
  6085. {
  6086. block(data, nil);
  6087. }
  6088. }
  6089. else
  6090. {
  6091. block(nil, error);
  6092. }
  6093. }];
  6094. }
  6095. /// 设置当前用户的语言配置
  6096. /// - Parameters:
  6097. /// - params: 参数
  6098. /// - block: 回调
  6099. - (void)toSettingTheTranslationConfigWith:(id)params andBlock:(void (^)(id data, NSError *error))block{
  6100. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_TranslationSteamSetting] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  6101. {
  6102. if (data)
  6103. {
  6104. if ([self handleError:data])
  6105. {
  6106. block(data, nil);
  6107. }
  6108. }
  6109. else
  6110. {
  6111. block(nil, error);
  6112. }
  6113. }];
  6114. }
  6115. /// 翻译 (文本翻译接口
  6116. /// - Parameters:
  6117. /// - params: 参数
  6118. /// - block: 回调
  6119. - (void)toTranslationTheContentWith:(id)params andBlock:(void (^)(id data, NSError *error))block{
  6120. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_TranslationText] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  6121. {
  6122. if (data)
  6123. {
  6124. if ([self handleError:data])
  6125. {
  6126. block(data, nil);
  6127. }
  6128. }
  6129. else
  6130. {
  6131. block(nil, error);
  6132. }
  6133. }];
  6134. }
  6135. #pragma mark =========== Beauty ============
  6136. /// 火山美颜+ar礼物物料相关控制器
  6137. /// - Parameters:
  6138. /// - params: 参数
  6139. /// - block: 回调
  6140. - (void)toGetTheBaseMaterialHuoShanInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  6141. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_BaseMaterialHuoShan] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  6142. {
  6143. if (data)
  6144. {
  6145. if ([self handleError:data])
  6146. {
  6147. block(data, nil);
  6148. }
  6149. }
  6150. else
  6151. {
  6152. block(nil, error);
  6153. }
  6154. }];
  6155. }
  6156. /// 用户信息 - 美颜信息设置
  6157. /// - Parameters:
  6158. /// - params: 参数
  6159. /// - block: 回调
  6160. - (void)toSettingTheUserBeautyInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  6161. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_UserSettingBeauty] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  6162. {
  6163. if (data)
  6164. {
  6165. if ([self handleError:data])
  6166. {
  6167. block(data, nil);
  6168. }
  6169. }
  6170. else
  6171. {
  6172. block(nil, error);
  6173. }
  6174. }];
  6175. }
  6176. /// 获取用户信息设置
  6177. /// - Parameters:
  6178. /// - params: 参数
  6179. /// - block: 回调
  6180. - (void)toGetTheUserBeautyInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block{
  6181. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_GetUserBeauty] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  6182. {
  6183. if (data)
  6184. {
  6185. if ([self handleError:data])
  6186. {
  6187. block(data, nil);
  6188. }
  6189. }
  6190. else
  6191. {
  6192. block(nil, error);
  6193. }
  6194. }];
  6195. }
  6196. #pragma mark - Error Handling
  6197. - (BOOL)handleError:(id)data{
  6198. NSInteger code = [data[@"code"] integerValue];
  6199. if(code == 100004){
  6200. //其他设备登录
  6201. SendNotification(@"kNotification_CloseTheRTC")
  6202. //如果已经执行了登出操作, 则不再执行kNotification_AgainLogin通知
  6203. NSString *tokenString = GetToken;
  6204. if(tokenString.length == 0){
  6205. return NO;
  6206. }
  6207. SendObjNotification(@"kNotification_AgainLogin", data);
  6208. return NO;
  6209. }
  6210. if(code == 30001){
  6211. //没钱, 提示充值
  6212. SendNotification(@"kNotification_NoMoney")
  6213. return NO;
  6214. }
  6215. if(code == 40001){
  6216. //点赞 没有绑定手机
  6217. SendNotification(@"kNotification_NoBindPhone")
  6218. return NO;
  6219. }
  6220. if(code == 70001){
  6221. //提示验证超时
  6222. [MBProgressHUD showTipMessageInWindow:NSLocalString(@"mimo_check_long_time")];
  6223. return NO;
  6224. }
  6225. return YES;
  6226. }
  6227. #pragma mark - Other
  6228. - (void)toCheckTheUserAboutChannelStatusWith:(id)params andBlock:(void (^)(id data, NSError *error))block{
  6229. //https://doc.shengwang.cn/doc/rtc/restful/channel-management/operations/get-user-property
  6230. NSString *baseUrl = @"https://api.sd-rtn.com/dev/v1/channel/user/property";
  6231. NSString *pathStr = [NSString stringWithFormat:@"%@/%@/%@",AgoraAppID,params[@"uid"],params[@"channelName"]];
  6232. [[MOOtherNetAPIClient jsonClientWithBaseUrl:baseUrl] requestJsonDataWithPath:pathStr withParams:nil withMethodType:Get andBlock:^(id _Nonnull data, NSError * _Nonnull error) {
  6233. if (data)
  6234. {
  6235. block(data, nil);
  6236. }
  6237. else
  6238. {
  6239. block(nil, error);
  6240. }
  6241. }];
  6242. }
  6243. #pragma mark =========== 盲盒礼物 ============
  6244. /// 盲盒礼物 - 抽奖
  6245. /// - Parameters:
  6246. /// - params: 参数
  6247. /// - block: 回调
  6248. - (void)drawBlindBoxWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block {
  6249. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_BlindBoxDraw] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  6250. {
  6251. if (data)
  6252. {
  6253. if ([self handleError:data])
  6254. {
  6255. block(data, nil);
  6256. }
  6257. }
  6258. else
  6259. {
  6260. block(nil, error);
  6261. }
  6262. }];
  6263. }
  6264. #pragma mark =========== 平台货币调整 ============
  6265. /// 获取用户金豆信息
  6266. /// - Parameters:
  6267. /// - params: 参数
  6268. /// - block: 回调
  6269. - (void)getGoldBeanInfoWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block {
  6270. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_GoldBeanInfo] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  6271. {
  6272. if (data)
  6273. {
  6274. if ([self handleError:data])
  6275. {
  6276. block(data, nil);
  6277. }
  6278. }
  6279. else
  6280. {
  6281. block(nil, error);
  6282. }
  6283. }];
  6284. }
  6285. /// 金豆转换钻石
  6286. /// - Parameters:
  6287. /// - params: 参数
  6288. /// - block: 回调
  6289. - (void)exchangeGoldBeanToDiamondWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block {
  6290. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_GoldBeanConvertDiamond] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  6291. {
  6292. if (data)
  6293. {
  6294. if ([self handleError:data])
  6295. {
  6296. block(data, nil);
  6297. }
  6298. }
  6299. else
  6300. {
  6301. block(nil, error);
  6302. }
  6303. }];
  6304. }
  6305. /// 金豆转换法币
  6306. /// - Parameters:
  6307. /// - params: 参数
  6308. /// - block: 回调
  6309. - (void)exchangeGoldBeanToCashWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block {
  6310. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_GoldBeanConvertCash] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  6311. {
  6312. if (data)
  6313. {
  6314. if ([self handleError:data])
  6315. {
  6316. block(data, nil);
  6317. }
  6318. }
  6319. else
  6320. {
  6321. block(nil, error);
  6322. }
  6323. }];
  6324. }
  6325. /// 获取法币汇率
  6326. /// - Parameters:
  6327. /// - params: 参数
  6328. /// - block: 回调
  6329. - (void)getGoldBeanExchangeRateWithParams:(id)params andBlock:(void (^)(id data, NSError *error))block {
  6330. [[MONetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"%@",kNetPath_Code_GoldBeanExchangeRate] withParams:params withMethodType:Post andBlock:^(id data, NSError *error)
  6331. {
  6332. if (data)
  6333. {
  6334. if ([self handleError:data])
  6335. {
  6336. block(data, nil);
  6337. }
  6338. }
  6339. else
  6340. {
  6341. block(nil, error);
  6342. }
  6343. }];
  6344. }
  6345. @end